-
-
Notifications
You must be signed in to change notification settings - Fork 680
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
Rector fixes formatting for php template syntax #8615
Comments
That's known drawback, see https://github.com/rectorphp/rector?tab=readme-ov-file#known-drawbacks I tested on https://getrector.com/demo/f2f6777c-c146-4309-b3d4-326f525cc702 and seems no change, It may be due to different tab vs space usage on your own. you can use coding standard tool after rector to handle that. |
I could catch it on another example https://getrector.com/demo/2cf6850a-d099-4fb9-801a-6e22aa793480 |
That may can be improved by regex check like in: Feel free to provide improvement PR, otherwise, you can rely to coding standard tool or skip the file https://getrector.com/documentation/ignoring-rules-or-paths |
May we open this issue, so that I or somebody else provides this fix in the future? That people see that such kind of problems exist? |
The space formatting is already stated as known drawback, not part of "bug", and that is fine as is, and may require refactor once we use php-parser v5. For templating file, I suggest to run once + fix coding style, then skip at rector.php :) You can create a PR improvement when you have a chance :) |
Bug Report
vendor/bin/rector --version
)I found that Rector tries to fix formatting of PHP Template syntax
Minimal PHP Code Causing Issue
Expected Behaviour
Expected that Rector would not change it, but now I got next
The text was updated successfully, but these errors were encountered: