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

HeaderCommentFixer - Fix unexpected removal of regular comments #4936

Merged
merged 1 commit into from
Oct 26, 2020

Conversation

julienfalque
Copy link
Member

Fixes #4925.

@SpacePossum
Copy link
Contributor

I think this will still remove the 2nd comment:

<?php

/*
 * foo
 */

declare(strict_types=1);

/* 2 */
foo();

@julienfalque
Copy link
Member Author

Indeed. Also this was a bad fix. I tried a different approach, I think it's more robust and reliable, but it's also a small behavior change: now the comments that are not in the expected location will not be removed unless they have the exact same content as the header.

@keradus keradus modified the milestones: 2.15.8, 2.15.9 Jun 27, 2020
Copy link
Contributor

@cs278 cs278 left a comment

Choose a reason for hiding this comment

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

Resolves #4925 for me.

@SpacePossum
Copy link
Contributor

Thank you @julienfalque.

@SpacePossum SpacePossum removed the RTM Ready To Merge label Oct 26, 2020
@SpacePossum SpacePossum merged commit 0cca8a5 into PHP-CS-Fixer:2.15 Oct 26, 2020
@julienfalque julienfalque deleted the header-comment branch October 26, 2020 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants