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

PHPCS: Update to YoastCS 2.0.0 #61

Merged
merged 5 commits into from
Jan 9, 2020
Merged

Conversation

jrfnl
Copy link
Contributor

@jrfnl jrfnl commented Dec 19, 2019

PHPCS: Update to YoastCS 2.0.0

This updates the dependency in composer.json, as well as the PHPCS ruleset for YoastCS 2.0.0.

Includes:

  • A selective update of the composer.lock for just YoastCS and its dependencies.
  • Removing the tweaks to the Composer check-cs script to allow for PHP >= 5.6.
    PHP 5.6 is now the minimum PHP version everywhere.

Ref: https://github.com/Yoast/yoastcs/releases/tag/2.0.0

CS: deprecate old-style hook and add new-style hook [1]

This deprecates the yoast_comment_hacks_notification_roles filter hook in favour of the Yoast\WP\Comment\notification_roles hook.

[This needs a changelog entry]

CS: deprecate old-style hook and add new-style hook [2]

This deprecates the yoast_ch_admin_footer action hook in favour of the Yoast\WP\Comment\admin_footer hook.

[This needs a changelog entry]

CS: deprecate old-style hook and add new-style hook [3]

This deprecates the yoast_comment_redirect filter hook in favour of the Yoast\WP\Comment\redirect hook.

[This needs a changelog entry]

CS: use short arrays (everywhere)

Testing

See the test instructions in the Yoast/wpseo-woocommerce#451 PR for guidance on how to test this PR.

@jrfnl jrfnl added this to the 1.6.0 milestone Dec 19, 2019
@jrfnl
Copy link
Contributor Author

jrfnl commented Dec 19, 2019

See here about why the build is failing: #59 (comment) and here to see that the CS check does in actual fact pass: https://travis-ci.org/Yoast/comment-hacks/jobs/627424234#L801

This updates the dependency in `composer.json`, as well as the PHPCS ruleset for YoastCS 2.0.0.

Includes:
* A selective update of the `composer.lock` for just YoastCS and its dependencies.
* Removing the tweaks to the Composer `check-cs` script to allow for PHP >= 5.6.
    PHP 5.6 is now the minimum PHP version everywhere.

Ref: https://github.com/Yoast/yoastcs/releases/tag/2.0.0
This deprecates the `yoast_comment_hacks_notification_roles` filter hook in favour of the `Yoast\WP\Comment\notification_roles` hook.

[This needs a changelog entry]
This deprecates the `yoast_ch_admin_footer` action hook in favour of the `Yoast\WP\Comment\admin_footer` hook.

[This needs a changelog entry]
This deprecates the `yoast_comment_redirect` filter hook in favour of the `Yoast\WP\Comment\redirect` hook.

[This needs a changelog entry]
@jrfnl jrfnl force-pushed the JRF/upgrade-to-yoastcs-2.0 branch from 8dceffc to bedb221 Compare December 19, 2019 21:02
@karlijnbok karlijnbok self-assigned this Jan 2, 2020
@karlijnbok
Copy link
Contributor

CR & Acceptance: 👍

@karlijnbok karlijnbok merged commit d98500c into trunk Jan 9, 2020
@karlijnbok karlijnbok deleted the JRF/upgrade-to-yoastcs-2.0 branch January 9, 2020 13:51
@karlijnbok karlijnbok modified the milestones: 1.6.0, 1.7.0 Apr 28, 2021
@karlijnbok karlijnbok added the changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog label Apr 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants