[wp-trac] [WordPress Trac] #53477: Composer: update PHP_CodeSniffer

WordPress Trac noreply at wordpress.org
Tue Jun 22 07:57:47 UTC 2021


#53477: Composer: update PHP_CodeSniffer
------------------------------+-------------------------
 Reporter:  jrf               |      Owner:  (none)
     Type:  task (blessed)    |     Status:  new
 Priority:  normal            |  Milestone:  5.9
Component:  Build/Test Tools  |    Version:
 Severity:  normal            |   Keywords:  needs-patch
  Focuses:  coding-standards  |
------------------------------+-------------------------
 The latest PHP_CodeSniffer release is
 [https://github.com/squizlabs/PHP_CodeSniffer/releases/tag/3.6.0 3.6.0]
 from April this year.

 Based on the `composer.lock` file, however, WP is still using PHPCS 3.5.5
 (April 2020).

 I'd like to recommend an update as the releases since PHPCS 3.5.5 contain
 various bugfixes which may benefit WP, as well as (nearly complete)
 support for everything PHP 8.0, though, for now, I'd still recommend
 running PHPCS on PHP 7.4 in CI.

 Relevant changelogs:
 * https://github.com/squizlabs/PHP_CodeSniffer/releases/tag/3.5.6
 * https://github.com/squizlabs/PHP_CodeSniffer/releases/tag/3.5.7
 * https://github.com/squizlabs/PHP_CodeSniffer/releases/tag/3.6.0

 To update, a patch is needed which:
 1. Updates the `composer.json` and `composer.lock` files.
 2. Verifies whether any exclusions made in the custom ruleset which were
 related to PHPCS bugs can be removed (and if applicable, removes them).
 3. Verifies whether any inline `phpcs:ignore` annotations which were
 related to PHPCS bugs can be removed (and if applicable, removes them).
 4. If necessary, selectively fixes newly flagged errors, which can happen
 when a "false negative" bug in PHPCS has been fixed.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53477>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list