You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to support compatibility with newer versions of PHP, we need to upgrade some of our tooling for compatibility, such as PHPCS.
WPCS recently released a long-awaited major release (v3) which adds needed compatibility with PHP 8.
Similarly, the WP VIP coding standards automattic/vipwpcs also released a new matching major version.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
wp-coding-standards/wpcs and automattic/vipwpcs should be upgraded to their latest versions
The PHPCS configuration should be updated as necessary to preserve compatibility with our current rules
Simple fixes that can be applied automatically by PHPCS should be included
anything requiring substantial manual updating/review should be excluded temporarily and a follow-up issue opened to address
Implementation Brief
Update wp-coding-standards/wpcs and automattic/vipwpcs to ^3 in composer.json and upgrade these with Composer to install the latest (including their dependencies)
This issue is largely about applying automatic fixes working through the failures raised and updating configuration as necessary
E.g. The WP core rule WordPress.PHP.DisallowShortTernary no longer exists and has been replaced by the Universal.Operators.DisallowShortTernary rule, so some reworking of the PHPCS configuration file is needed. This isn't very intuitive and can result in many more errors raised if done incorrectly.
Test Coverage
No changes in coverage
QA Brief
Changelog entry
The text was updated successfully, but these errors were encountered:
@aaemnnosttv I hope #8757 is helpful. I haven't addressed any errors aside from updating the obsolete sniff names. Please feel free to decide which sniffs you want to run on this code (report summary added in the PR description), and I can take care of the remaining fixes.
Feature Description
In order to support compatibility with newer versions of PHP, we need to upgrade some of our tooling for compatibility, such as PHPCS.
WPCS recently released a long-awaited major release (v3) which adds needed compatibility with PHP 8.
Similarly, the WP VIP coding standards
automattic/vipwpcs
also released a new matching major version.Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
wp-coding-standards/wpcs
andautomattic/vipwpcs
should be upgraded to their latest versionsImplementation Brief
wp-coding-standards/wpcs
andautomattic/vipwpcs
to^3
incomposer.json
and upgrade these with Composer to install the latest (including their dependencies)WordPress.PHP.DisallowShortTernary
no longer exists and has been replaced by theUniversal.Operators.DisallowShortTernary
rule, so some reworking of the PHPCS configuration file is needed. This isn't very intuitive and can result in many more errors raised if done incorrectly.Test Coverage
QA Brief
Changelog entry
The text was updated successfully, but these errors were encountered: