Skip to content
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

Invalid modification of PHPDoc comments #4817

Closed
buffcode opened this issue Dec 7, 2020 · 3 comments
Closed

Invalid modification of PHPDoc comments #4817

buffcode opened this issue Dec 7, 2020 · 3 comments
Labels

Comments

@buffcode
Copy link
Contributor

buffcode commented Dec 7, 2020

Bug Report

Subject Details
Rector version dev-master@ca35301
Installed as Online rector

This might be an upstream issue

When rector checks the given minimal testcase below, the second route annotation will be modified.
The quotes around the string parameter name get removed which is wrong, because

  1. No rector is modifying it (parser issue?)
  2. The first route, though being identical is not touched (inconsistency)
  3. The parameter is a string and as such should not be touched at all (null vs "null" is obviously a difference)

Minimal PHP Code Causing Issue

https://getrector.org/demo/92c921ea-1bd9-40ea-bccd-c3bc9b4a95c8

Expected Behaviour

Code should not get modified at all.

@buffcode buffcode added the bug label Dec 7, 2020
@TomasVotruba
Copy link
Member

TomasVotruba commented Dec 7, 2020

Related to #4334

@buffcode
Copy link
Contributor Author

buffcode commented Dec 7, 2020

@TomasVotruba Is the close/relation correct? #4454 is a merged PR from end of october.

@TomasVotruba
Copy link
Member

Miss click on a phone. I've fixed the number now

Thank you for letting me know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants