Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: used new parent relation on instanceof control for has one through #15265

Open
wants to merge 3 commits into
base: 3.x
Choose a base branch
from

Conversation

musaberatbahadir
Copy link

Description

fix for the issue I created. CreateAction is checking the correct class on instance of control now.

@musaberatbahadir musaberatbahadir changed the title used new parent relation on instanceof control for has one through Fix: used new parent relation on instanceof control for has one through Jan 6, 2025
@danharrin danharrin added the bug Something isn't working label Jan 7, 2025
@danharrin danharrin added this to the v3 milestone Jan 7, 2025
Copy link
Member

@danharrin danharrin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would break Laravel 10.x compatibility, right? Can you do a class_exists() check and check the correct parent class based on that please?

@musaberatbahadir
Copy link
Author

@danharrin I've added the check you have mentioned above

@musaberatbahadir
Copy link
Author

musaberatbahadir commented Jan 7, 2025

@danharrin I also realized that instanceof HasManyThrough control causes other errors on my project like in Filament\Tables\Table\Concerns\HasQuery, do you want me to replace all of them as I did on the last commit, or do you wanna introduce some config level check by controlling laravel version or class_exists function?
there are 6 more instanceof HasManyThrough control

@danharrin
Copy link
Member

Please can you do the class_exists() in all places?

@musaberatbahadir
Copy link
Author

Done! @danharrin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants