Closed niji-mneute closed 2 years ago
Thank you for your report and demo link!
Could you send a failing test case in a pull-request, so we have it covered in Rector? You can click "Create a Test" button at demo page.
Yes, that's correct. It should be as simple as possible though. E.g. with one nesting. It will make test better isolated and easier to fix.
Bug Report
When a constant is used to define an array key inside an annotation, Rector wraps it with quotes when converting to attributes (ie:
AbstractObjectNormalizer::SKIP_NULL_VALUES
becomes'AbstractObjectNormalizer::SKIP_NULL_VALUES'
).Minimal PHP Code Causing Issue
See https://getrector.org/demo/1ec85a79-2b52-641e-89af-8128ec1e3b09
Responsible rules
AnnotationToAttributeRector
Expected Behavior
The constant used as an array key is kept as is.