Skip to content

PHPCS 3.?.?: remove temporary test exclusion on PHP 8.2+ #2123

Closed
@jrfnl

Description

@jrfnl

Rationale

PR #2121 adds a temporary test exception for a test involving a function call to readonly().

Once the upstream PHPCS tokenizer supports PHP 8.2 - hopefully in PHPCS 3.8.0 -, the minimum supported PHPCS version should be raised and the exclusion should be removed.

While this may sound like a test tweak, it is in actual fact an issue with the sniff as the WP DeprecatedFunctions sniff will currently not report on the deprecated readonly() WP function, while it is important that it should as it will prevent plugins/themes from running into trouble when using the deprecated WP readonly() function with future PHP versions in which the function call will likely become a fatal error, so making this change as early as possible is highly recommended.

References

Action Checklist

Once a PHPCS version is available which handles this correctly...

  • Update the minimum supported PHPCS version in composer.json and update the README and workflows etc.
  • Remove the test exception from the DeprecatedFunctions sniff.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions