humanmade / coding-standards

Human Made coding standards for modern code
https://engineering.hmn.md/how-we-work/style/
154 stars 19 forks source link

WPCS/I18n refactor breaks HM-Minimum on PHP 8.2 #308

Open benjaminprojas opened 1 year ago

benjaminprojas commented 1 year ago

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" />
    ...
rmccue commented 8 months ago

Thanks! I've fixed this in https://github.com/humanmade/coding-standards/pull/314 as part of our phpcs upgrade.

benjaminprojas commented 8 months ago

@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 😄

rmccue commented 8 months ago

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 :)