-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Squiz.WhiteSpace.ScopeClosingBrace fixer removes HTML content when fixing closing brace alignment #3422
Comments
@GlennBags The issue cannot be reproduced with the code sample you provided. |
OK, apologies, the code sample was incomplete. Please try:
Using the above file as the test.php, I am able to replicate using the following ruleset:
|
@GlennBags Thanks, that's better. Reproduced the issue. Thanks for reporting it. The problem is in the This will need looking into. |
@GlennBags I've prepared a fix for this issue. See PR #3447. Testing appreciated. |
Am I able to check this out to test using composer? |
@GlennBags You should be able to using Once PR #3442 has been merged, testing PRs should become easier as you can then download a PHAR file for each PR to use for testing. |
@GlennBags Just thinking - if it helps, I could generate the PHAR file for the PR for you. Let me know if you want that. |
@jrfnl Yes, apparently I can't get it from composer command line, or am I doing something wrong?
|
Well, duh, I'm testing using the phar, so, yeah, a phar file would help. |
@GlennBags 😂 you were also missing the You can download zips containing the |
Awesome, thank you. Works like a charm.
Post (after running the phpcbf):
|
Thanks for testing @GlennBags ! |
Describe the bug
Div end tag removed when reformatting using phpcbf to reformat code to PSR-12 standard
Code sample
Custom ruleset
To reproduce
Steps to reproduce the behavior:
test.php
with the code sample above...php phpcbf.phar --standard=ruleset.xml test.php -v
Expected behavior
Should not remove HTML
Versions (please complete the following information):
PHP_CodeSniffer version 3.6.0 (stable) by Squiz (http://www.squiz.net)
The text was updated successfully, but these errors were encountered: