Open aaemnnosttv opened 1 month ago
@aaemnnosttv I hope https://github.com/google/site-kit-wp/pull/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.
IB ✔️
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:Eng Brief
Changelog entry