Skip to content

Conversation

@TomasVotruba
Copy link
Member

@TomasVotruba TomasVotruba commented Jan 14, 2026

Proper fix for rectorphp/getrector-com#3531

Rector short class names must be unique, so there is no ambiguity while using them in config or in the docs.
I've added CI script to make sure we won't miss it again :)

@TomasVotruba TomasVotruba changed the title tv unique name [dx] Rename DeprecatedAnnotationToDeprecatedAttributeRector for PHP 8.5 to explicit ClassConstDeprecatedAttributeRector to make class names unique Jan 14, 2026
@TomasVotruba TomasVotruba changed the title [dx] Rename DeprecatedAnnotationToDeprecatedAttributeRector for PHP 8.5 to explicit ClassConstDeprecatedAttributeRector to make class names unique [dx] Rename DeprecatedAnnotationToDeprecatedAttributeRector for PHP 8.5 to explicit ConstDeprecatedAttributeRector to make class names unique Jan 14, 2026
@TomasVotruba
Copy link
Member Author

TomasVotruba commented Jan 14, 2026

PHP 8.5 also introduces same for traits - https://wiki.php.net/rfc/deprecated_traits, added Trait_

@TomasVotruba TomasVotruba changed the title [dx] Rename DeprecatedAnnotationToDeprecatedAttributeRector for PHP 8.5 to explicit ConstDeprecatedAttributeRector to make class names unique [dx] Rename DeprecatedAnnotationToDeprecatedAttributeRector for PHP 8.5 to explicit ConstAndTraitDeprecatedAttributeRector to make class names unique Jan 14, 2026
….5 to explicit ConstAndTraitDeprecatedAttributeRector, add trait suport
@TomasVotruba TomasVotruba merged commit 815e309 into main Jan 14, 2026
59 checks passed
@TomasVotruba TomasVotruba deleted the tv-unique-name branch January 14, 2026 10:38
@samsonasik
Copy link
Member

Test need to be updated to use assertSame() to verify all unique for long vs short name count on getrector.com test:

https://github.com/rectorphp/getrector-com/blob/30df83d16ec576935b633a6c27c3d4a78345359d/tests/FileSystem/RectorFinderTest.php#L35-L39

@TomasVotruba
Copy link
Member Author

This verison is now pushed on rector/rector:dev-main. Go for it 👍 Also remove the hack for the same name introduced in rectorphp/getrector-com#3534

@samsonasik
Copy link
Member

sure, here the PR:

@TomasVotruba
Copy link
Member Author

Awesome, thanks 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants