Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore PHP errors related to the version being run #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jazzsequence
Copy link
Contributor

This is an issue that is likely coming from PHPCompatibility or PHPCompatibility-WP. The issue was present in WPCS (but fixed in 3.0). There is no real benefit for leaving error reporting in when it has to do with a CS ruleset, so I think we can safely just ignore errors.
See: WordPress/WordPress-Coding-Standards#2035
See also: https://gist.github.com/shreyasikhar/f4495ac952586096eb81d505e9e914a4

This is an issue that is likely coming from PHPCompatibility or PHPCompatibility-WP. The issue was present in WPCS (but fixed in 3.0). There is no real benefit for leaving error reporting in when it has to do with a CS ruleset, so I think we can safely just ignore errors.
See: WordPress/WordPress-Coding-Standards#2035
See also: https://gist.github.com/shreyasikhar/f4495ac952586096eb81d505e9e914a4
@jazzsequence jazzsequence requested a review from a team as a code owner December 10, 2024 17:57
@jazzsequence jazzsequence self-assigned this Dec 10, 2024
@pwtyler
Copy link
Member

pwtyler commented Dec 10, 2024

Per the linked issues is this not resolved with 3.0? Where is this cropping up?

@jazzsequence
Copy link
Contributor Author

@pwtyler I saw it on my own site that was using the standard. I think it's coming from phpcompatibility-wp rather than WPCS, but the version in the composer.json is current. AFAICT, it's the PHPCompatibility part that's the problem not the WP part.

@jazzsequence
Copy link
Contributor Author

An alternative solution to this would be to (likely) require "phpcompatibility-wp": "dev-develop" instead of ^2.1 but I feel generally worse about that than just ignoring the errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants