-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[RFC] Deprecate most of or all annotations? #49369
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
Comments
Yes. Let's kill Doctrine Annotations. |
Knowing that the Rector implementation of migrating annotations to attributes is currently broken (because their parsing of Doctrine annotations is broken, ignoring the fact that string literals are a thing in annotations and quotes are not just a parenthesis-like delimiter), there is no easy working migration path for now. |
@stof there is a work in progress to fix that: rectorphp/rector-src#3645 |
@derrabus Thanks for the update! Is there still some annotations that are not (yet) deprecated? |
No, it's done. |
Uh oh!
There was an error while loading. Please reload this page.
Description
There is ongoing work about deprecating the usage of annotations:
@required
annotation #48990I didn't see a general discussion about this subject, so I created this issue to raise the question:
Should some or all annotations be deprecated in 6.3 and removed in 7.0?
Attributes are natively supported with Symfony 6.3+, because it requires PHP ≥ 8.1 and attributes were added in PHP 8.0. While annotations require to install
doctrine/annotations
.On a side note, PHPUnit 10 allow to use attributes instead of annotations: sebastianbergmann/phpunit#4502
Example
The text was updated successfully, but these errors were encountered: