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

[format preserving] Add test for removed opening PHP tag #884

Conversation

TomasVotruba
Copy link
Contributor

It seems the removed stmt right under HTML node removes the <?php opening tag and crashes the code.

Reported in Rector: rectorphp/rector-src#2909

@nikic nikic closed this in b0edd4c Sep 21, 2022
@TomasVotruba TomasVotruba deleted the tv-tests-removed-stmts-with-html branch September 21, 2022 22:53
nikic added a commit that referenced this pull request Nov 12, 2022
If dropping a node would drop PHP tags, bail out of formatting
preservation. This will lose formatting, but at least produce
legal code.

Closes GH-884.

(cherry picked from commit b0edd4c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant