[PHP84] Deprecated annotation to Deprecated attribute#6923
[PHP84] Deprecated annotation to Deprecated attribute#6923TomasVotruba merged 11 commits intorectorphp:mainfrom
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 |
Based on the PHP 8.4 rule from rectorphp#6923
Based on the PHP 8.4 rule from rectorphp#6923
Based on the PHP 8.4 rule from rectorphp#6923, logic was moved to a new `DeprecatedAnnotationToDeprecatedAttributeConverter` service to avoid duplication.
Based on the PHP 8.4 rule from rectorphp#6923, logic was moved to a new `DeprecatedAnnotationToDeprecatedAttributeConverter` service to avoid duplication.
Based on the PHP 8.4 rule from #6923, logic was moved to a new `DeprecatedAnnotationToDeprecatedAttributeConverter` service to avoid duplication.
|
This pull request has been automatically locked because it has been closed for 150 days. Please open a new PR if you want to continue the work. |
Changes
DEPRECATED_ATTRIBUTEconstantWhy
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.