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

Composer: use PHPCS 3.3.1 #87

Merged
merged 1 commit into from
Aug 3, 2018
Merged

Conversation

jrfnl
Copy link
Collaborator

@jrfnl jrfnl commented Aug 2, 2018

Aside from it being a new release with lots of bug fixes, there are also a few specific changes in PHPCS 3.3.1 which benefit YoastCS and necessitate updating the minimum version:

  • Generic.Commenting.DocComment no longer generates the SpacingBeforeTags error if tags are the first content in the docblock
    • The sniff will still generate a MissingShort error if there is no short comment
      -This allows the MissingShort error to be suppressed in a ruleset to make short descriptions optional

As a lot of plugins still have issues with missing short descriptions, the SpacingBeforeTags error was also being thrown and had to be forcibly excluded. These exclusions can now be removed.

  • Squiz.WhiteSpace.FunctionSpacing no longer checks spacing of functions at the top of an embedded PHP block
    • Fixes a conflict between this sniff and the Squiz.PHP.EmbeddedPHP sniff

This bug was discovered via one of the Yoast plugins, so having this fix prevents needing a work-around.

Ref: https://github.com/squizlabs/PHP_CodeSniffer/releases/tag/3.3.1

Aside from it being a new release with lots of bug fixes, there are also a few specific changes in PHPCS 3.3.1 which benefit YoastCS and necessitate updating the minimum version:

> * Generic.Commenting.DocComment no longer generates the SpacingBeforeTags error if tags are the first content in the docblock
>     - The sniff will still generate a MissingShort error if there is no short comment
>     -This allows the MissingShort error to be suppressed in a ruleset to make short descriptions optional

As a lot of plugins still have issues with missing short descriptions, the `SpacingBeforeTags` error was also being thrown and had to be forcibly excluded. These exclusions can now be removed.

> * Squiz.WhiteSpace.FunctionSpacing no longer checks spacing of functions at the top of an embedded PHP block
>     - Fixes a conflict between this sniff and the Squiz.PHP.EmbeddedPHP sniff

This bug was discovered via one of the Yoast plugins, so having this fix prevents needing a work-around.

Ref: https://github.com/squizlabs/PHP_CodeSniffer/releases/tag/3.3.1
@jrfnl jrfnl added this to the 1.0.0 milestone Aug 2, 2018
@moorscode moorscode merged commit f880c53 into develop Aug 3, 2018
@moorscode moorscode deleted the JRF/up-minimum-phpcs-to-3.3.1 branch August 3, 2018 06:43
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.

2 participants