-
Notifications
You must be signed in to change notification settings - Fork 60
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
Exception thrown by I18nSniff in PHP 8.1 #136
Comments
This seems like a P0 and should be fixed ASAP. |
@jjgrainger I check the issue in deeply and found that the issue is in Approach 1: Update Develop branch: "require-dev": {
"wp-coding-standards/wpcs": "dev-develop"
} Last commit branch: "require-dev": {
"wp-coding-standards/wpcs": "dev-feature/abstractclassrestrictions-improvements"
} Approach 2: We can add steps in our readme.txt/readme.md how to update Using Plugin check on PHP 8.1If you plan on using this plugin on PHP 8.1, you will need to make some modifications to your Composer configuration. Add the Composer repository to your project's Switch to the develop VersionAdd the following to your "require-dev": {
"wp-coding-standards/wpcs": "dev-develop"
} @felixarntz @joemcgill @spacedmonkey i did like to get you feedback on this so we can move forward. |
The related tickets. WordPress/WordPress-Coding-Standards#2070 & WordPress/WordPress-Coding-Standards#1877 Seems like their is plans or release plans for 3.0.0 which will have support for PHP 8.0+. We have options.
Load from dev-develop, I would recommend locking down to a commit like this. Using composer patches might be a tidy solution, but might result in find other issues with PHP 8.0. Using |
If we want to support PHP 8.1 with WPCS sniffs, I think the only real solution is to use the |
If we are going to load from a |
Thanks for the input here everyone! Just adding that we plan to use a number of WPCS sniffs in other checks (not just the @mukeshpanchal27 can you move this one forward with this approach and let me know if you have any question. Thanks |
While testing in PHP 8.1 all warnings from the
I18n_Usage_Check
are replaced by the following Exception thrown. It looks as though the issue is to do with WPCS dependency rather than the plugin check itself but we may want to consider how this is handled?The text was updated successfully, but these errors were encountered: