-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: DI Extension deprecated since Symfony 7.1 #8187
Conversation
Can you also bump the rector version in the composer.json ? It will fix the rector CI. |
Thanks |
@@ -16,7 +16,7 @@ | |||
use Sonata\AdminBundle\FieldDescription\FieldDescriptionInterface; | |||
use Sonata\AdminBundle\Templating\TemplateRegistryInterface; | |||
use Symfony\Component\DependencyInjection\ContainerBuilder; | |||
use Symfony\Component\HttpKernel\DependencyInjection\Extension; | |||
use Symfony\Component\DependencyInjection\Extension\Extension; |
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 don't know if we have something to prevent about this change. but technically, this is a BC break.
The replacing class does not inherit the deprecated class.
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.
Oh, I thought it was... Dunno why it wasnt done this way to help BC...
Is it worth a BC layer then ?
Shouldn't our DependencyInjection/Extension file be marked as internal ?
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 agree with marking our own DI extension as internal. AFAIK, we haven't defined any extension point here (but we should check, I'm just talking from what I remember).
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.
The AbstractSonataAdminExtension is used in other bundle and could technically be used by someone else for a custom persistence bundle...
https://github.com/search?q=org%3Asonata-project%20AbstractSonataAdminExtension&type=code
Subject
Since Symfony 7.1:
Related Symfony PR: symfony/symfony#53801
I am targeting this branch, because these changes are BC.
Changelog
Other bundles like SonataBlockExtension, SonataFormExtension, etc. have the same deprecation, will take care of them if this proposed fix is ok for you.