coding-standards
coding-standards copied to clipboard
WPCS/I18n refactor breaks HM-Minimum on PHP 8.2
WPCS recently deprecated a temporary property called check_translator_comments that is currently being used in the HM-Minimum ruleset.
Commit details here: https://github.com/WordPress/WordPress-Coding-Standards/commit/31064cf7a49931c0cf165b923ac0a86c20b2e4b4
Affected code is here: https://github.com/humanmade/coding-standards/blob/e8ec095e7128a3819e254a238902746ec00ece0d/HM-Minimum/ruleset.xml#L160-L163
I think the solution is as easy as:
<rule ref="WordPress.WP.I18n">
<exclude name="WordPress.WP.I18n.MissingTranslatorsComment" />
...
Thanks! I've fixed this in https://github.com/humanmade/coding-standards/pull/314 as part of our phpcs upgrade.
@rmccue that's great to hear! We ended up forking this repo and bringing it all up to speed for PHP 8.2 as I didn't think it was being maintained anymore. Excited to see these updates come through 😄
We use it every day on many projects, we've just been slow to update to PHP 8.2 due to WP's compatibility with it :)