-
-
Notifications
You must be signed in to change notification settings - Fork 393
[PHP84] Deprecated annotation to Deprecated attribute #6923
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
[PHP84] Deprecated annotation to Deprecated attribute #6923
Conversation
Thanks Peter 👍 How is the attribute supporting doing in PHPStan https://github.com/phpstan/phpstan-deprecation-rules ? We don't want to break those 2, as that's the main benefit of |
rules/Php84/Rector/Class_/DeprecatedAnnotationToDeprecatedAttributeRector.php
Outdated
Show resolved
Hide resolved
rules/Php84/Rector/Class_/DeprecatedAnnotationToDeprecatedAttributeRector.php
Outdated
Show resolved
Hide resolved
…ibuteRector.php Co-authored-by: Abdul Malik Ikhsan <samsonasik@gmail.com>
@TomasVotruba it appears I got a head of myself 😓 PHPStan doesn't seem to support it, nor does PHPStorm. Equally only till testing it more did I realise that the attribute only works with Functions/Class Methods/Constants, so it's a bit poor compared to the annotation. Happy to shelve this PR until the attribute is more useful. |
rules/Php84/Rector/Class_/DeprecatedAnnotationToDeprecatedAttributeRector.php
Show resolved
Hide resolved
rules/Php84/Rector/Class_/DeprecatedAnnotationToDeprecatedAttributeRector.php
Outdated
Show resolved
Hide resolved
rules/Php84/Rector/Class_/DeprecatedAnnotationToDeprecatedAttributeRector.php
Outdated
Show resolved
Hide resolved
…ibuteRector.php Co-authored-by: Abdul Malik Ikhsan <samsonasik@gmail.com>
Thank you Peter 🥳 Let's ship it |
Changes
DEPRECATED_ATTRIBUTE
constantWhy
Pretty self explanatory. This just moves the annotation to an attribute as is the case for a lot of things in the PHP world now. The attribute was added in PHP 8.4.