-
-
Notifications
You must be signed in to change notification settings - Fork 699
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Symfony Route annotations are broken by Rector DEAD_CODE #4573
Comments
Might be related to #3932 however the change made is different. I am eager to find a solution, but am not sure where to start looking for these annotation updates using the DEAD_CODE set. |
Hi, this is well known problem. The PHP code (without docblocks) has php-parser, that is handling its format to its best. There is issue there, that was only solved in version 3 The annotation don't have such a tool. Making such a tool requires to hugely modify phpstan/php-doc-parser, which might take months of work. This will be solved in PHP 8 with attributes, but we're not there yet. Saying that, there are made few assumptions to make php doc changes work. What real issue this causes aparat different syntax? |
Sub-problem of #4334 |
Bug Report
Rector "DEAD_CODE" changes Symfony Route annotations defaults incorrectly.
defaults={"_format": "json"}
becomesdefaults={"_format"="json"}
.Minimal PHP Code Causing Issue
https://getrector.org/demo/8d9faf4a-1729-4c34-8d56-6adf9cc63eaf#result
Expected Behaviour
Rector DEAD_CODE should not change the
:
(including space) to=
in Route annotations.The text was updated successfully, but these errors were encountered: