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

Laravel 11 new generic types #266

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

GeniJaho
Copy link
Collaborator

Relates to #263.

  • Makes the rule as non-configurable, as before, so users won't need to change their configurations.
  • The check for the Laravel version is done within the rule, using Reflection, and checking the VERSION const of the Laravel Application class. Should we refactor this functionality into a class of its own, or wait for when we reach for it on future rules?
  • I've used the Laravel Container's when-needs-give capabilities to provide an optional Application class for testing the two versions.
  • I'm not sure if there is any performance penalty for doing that check on every model relationship. I don't think there is any significant penalty, but it's still something to remember.

Is there a better way to do this @peterfox?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant