Skip to content

Conversation

@samsonasik
Copy link
Member

@samsonasik samsonasik commented Apr 18, 2025

It cause crash:

There was 1 error:

1) Rector\Tests\Issues\TestDocAnnotation\TestDocAnnotationTest::test with data set #0 ('/Users/samsonasik/www/rector-...hp.inc')
InvalidArgumentException: Name cannot be empty

/Users/samsonasik/www/rector-src/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php:254
/Users/samsonasik/www/rector-src/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php:29
/Users/samsonasik/www/rector-src/src/PhpAttribute/AnnotationToAttributeMapper/ClassConstFetchAnnotationToAttributeMapper.php:37
/Users/samsonasik/www/rector-src/src/PhpAttribute/AnnotationToAttributeMapper.php:39
/Users/samsonasik/www/rector-src/src/PhpAttribute/AnnotationToAttributeMapper/ArrayAnnotationToAttributeMapper.php:49

Fixes rectorphp/rector#9120

The patch needs to be in rector-src so test is in here.

@samsonasik
Copy link
Member Author

Fixed 🎉 /cc @mvhirsch

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba I am merging it ;)

@samsonasik samsonasik merged commit 6fb6fa4 into main Apr 18, 2025
45 checks passed
@samsonasik samsonasik deleted the crash-testdox branch April 18, 2025 16:44
@samsonasik samsonasik mentioned this pull request Apr 18, 2025
@mvhirsch
Copy link
Contributor

Thank you @samsonasik

@samsonasik
Copy link
Member Author

It seems cause scoped error on website update

https://github.com/rectorphp/getrector-com/actions/runs/14539573071/job/40794730275?pr=2964#step:9:15

I will check

@samsonasik
Copy link
Member Author

#6848

@github-actions
Copy link
Contributor

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect behavior of AnnotationToAttributeRector

3 participants