-
Notifications
You must be signed in to change notification settings - Fork 379
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
Inject an AttributeReader when annotations are disabled #486
Conversation
This avoids triggering the fallback path of instantiating an (uncached) annotation reader in the extensions in case annotations are disabled in FrameworkBundle but the `doctrine/annotations` package is still installed.
@stof , Could you please help with a doubt? Is there a way to tell whether I can choose annotations or attributes? If I have another bundle that still injects the annotations reader into the container, will stof instantiate annotations reader as default? Are there any other releases that already make this possible? thank you so much |
This bundle does not instantiate an annotation reader. It uses the However, note that enabling the support of annotations does not disable support for attributes. The Gedmo extensions support attributes all the time on PHP 8+. |
Yes, i'm using attributes with Gedmo,
My project there annotation_reader active in the container yet, Is there any way to not use the annotation_reader without the search being through the container? Thank you for the feedback. |
@igordeveloper if you cannot disable the support of annotations from the FrameworkBundle configuration (because something still needs annotations in your project), no. |
Yes, i have disabled in the framework, but unfortunately I have 2 packages using still annotations. Thanks for the answer and you time. |
If it is disabled in the framework, this PR should be solving the deprecation you report (assuming you use this bundle to configure the Gedmo listeners of course. If you configure them yourselves, there is no point commenting on this bundle at all) |
I will check if i disable correclty, thank you. |
thank you for the help. The problem with annotation deprecations was solved here. |
This avoids triggering the fallback path of instantiating an (uncached) annotation reader in the extensions in case annotations are disabled in FrameworkBundle but the
doctrine/annotations
package is still installed.Closes #481