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

fix: Strip left spaces from opening tags when comparing output for changes #5701

Merged
merged 4 commits into from Mar 10, 2024

Conversation

stilliard
Copy link
Contributor

When checking for changes, spaces can be temp removed from before the opening PHP tags in both the original and new content to cut down on whitespace only changes.

Fixes: rectorphp/rector#8533

Should be safe & unit tests pass, however I could wrap this in a config check and make it an opt in thing to ignore whitespace before opening tags if needed?

Let me know what you think, thanks.

…anges

Spaces removed from before opening tags in both the original and new content.

Fixes: rectorphp/rector#8533
stilliard and others added 2 commits March 8, 2024 14:15
Co-authored-by: Abdul Malik Ikhsan <samsonasik@gmail.com>
@stilliard
Copy link
Contributor Author

Hi @samsonasik
Thanks for reviewing the code earlier.
I believe the changes are now made and I've run it through phpunit again to make sure it still passes.
Let me know if there's anything else I can improve with it, thanks!

@stilliard
Copy link
Contributor Author

Thanks @samsonasik, just pushed a fix for that.

Copy link
Member

@samsonasik samsonasik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

@samsonasik
Copy link
Member

@TomasVotruba let's merge it, thank you @stilliard

@samsonasik samsonasik merged commit bdc0907 into rectorphp:main Mar 10, 2024
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants