-
-
Notifications
You must be signed in to change notification settings - Fork 921
Handle deprecations from Doctrine Inflector #3564
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
Handle deprecations from Doctrine Inflector #3564
Conversation
Don't you think it would be nice to use an interface to change easily the implementation (for instance if we want to use Symfony String)? |
First of all, you could very well hide Symfony String behind the façade I'm sugesting here as well. Yes, I think an interface would be nice. But in order to use such an interface effectively, the inflector shouldn't be called statically but injected via DI instead. That would be a larger change. I'd suggest wait with that change until php 7.1 support is dropped so we actually have access to Symfony String or the non-static Doctrine Inflector. My goal was to provide a minimal solution, so a bugfix release could be shipped that does not trigger deprecation warnings anymore. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this solution for now, would you be able to rebase fix my comments and rebase?
Definitely agree on this but this would be considered as a new feature as we'd need to change more code and add some dependency injection. We need to turn our tests to green and to keep on supporting php 7.1 for now. |
Done. |
Thank you very much @derrabus! |
This is an alternative approach to #3560. Since Doctrine Inflector cannot be bumped to version 1.4 without dropping support for php 7.1, this PR introduces a façade that uses the new API if it's available and falls back to the 1.3 API otherwise.
This change removed a lot of messages from my application's deprecation log.