Skip to content

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?

@canvural
Copy link
Contributor

I tested it in a project and it works great 👍🏽

@GeniJaho GeniJaho merged commit 65c14c5 into main Nov 4, 2024
5 checks passed
@GeniJaho GeniJaho deleted the laravel-11-new-generic-types branch November 4, 2024 18:32
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.

3 participants