Skip to content

Use @deprecated docblock over native attribute on set list constants#953

Merged
TomasVotruba merged 1 commit into
mainfrom
fix-deprecated-setlist-notice-9788
Jun 28, 2026
Merged

Use @deprecated docblock over native attribute on set list constants#953
TomasVotruba merged 1 commit into
mainfrom
fix-deprecated-setlist-notice-9788

Conversation

@TomasVotruba

@TomasVotruba TomasVotruba commented Jun 28, 2026

Copy link
Copy Markdown
Member

The native #[\Deprecated] attribute triggers PHP runtime deprecation
notices whenever a deprecated set list constant is accessed internally
(e.g. annotations-to-attributes.php, RectorConfigBuilder), which leaked
to users on every bin/rector run.

Switch the constants to @deprecated docblocks, which IDEs and Rector
still report but PHP does not emit at runtime. Skip
DeprecatedAnnotationToDeprecatedAttributeRector so Rector does not
convert them back to the attribute.

Fixes rectorphp/rector#9788
@TomasVotruba TomasVotruba force-pushed the fix-deprecated-setlist-notice-9788 branch from 7069b13 to 399d5da Compare June 28, 2026 14:15
@TomasVotruba TomasVotruba merged commit 8c854a4 into main Jun 28, 2026
8 checks passed
@TomasVotruba TomasVotruba deleted the fix-deprecated-setlist-notice-9788 branch June 28, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

PHP Deprecated notice on run bin/rector

1 participant