-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Create AttributeLoader instead use AnnotationLoader #48350
Comments
Hello, the Doctrine Annotations Reader is an optional dependency of Do you need an explicit way to disable the annotation? What is the benefit of disabling reading annotations when Here is the code that could be updated to disable annotation reader with a new option: symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php Lines 1524 to 1529 in c79d4ab
|
If we deprecate Doctrine Annotations completely, renaming classes, methods etc. would be the next logical step. But not before that. |
This PR #49358 and following Renaming will fix this issue |
For Routing, yes. We would need to do the same for Serializer and Validator then. |
Thank you for this issue. |
It's done in #51425. Thanks @alexandre-daubois |
Description
Today, symfony
AnnotationLoader
loadfor Doctrine annotations and PHP 8 attributes.
For new projects, only attributes are enough and keep naming
AnnotationLoader
can confuse (load also attributes).WDYT about creating
AttributeLoader
?Some files and impacts:
Symfony\Component\Validator\Mapping\Loader\AnnotationLoader
-> New classSymfony\Component\Validator\Mapping\Loader\AttributeLoader
:Symfony\Component\Validator::enableAnnotationMapping()
-> Introduce new methodenableAttributeMapping
enable_attributes
Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader
-> New classSymfony\Component\Serializer\Mapping\Loader\AttributeLoader
:enable_attributes
Example
No response
The text was updated successfully, but these errors were encountered: