This repository was archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 215
npm run lint:php command doesn't work on PHP 8.x #11834
Copy link
Copy link
Open
Labels
status: staleStale issues and PRs have had no updates for 60 days.Stale issues and PRs have had no updates for 60 days.team: Kirigami & Origamitype: cooldownThings that are queued for a cooldown period (assists with planning).Things that are queued for a cooldown period (assists with planning).type: dependenciesPull requests that update a dependency file (used by renovate).Pull requests that update a dependency file (used by renovate).
Description
Describe the bug
Currently, the current version of woocommerce-sniffs isn't compatible with the PHP 8.x version. If you run the command npm run lint:php with PHP 8.x, you have this error for each .PHP file:
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | An error occurred during processing; checking has been aborted. The error message was: trim(): Passing null to parameter #1 ($string) of type string is deprecated in
| | /Users/gigitux/work/woocommerce-blocks/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/NamingConventions/PrefixAllGlobalsSniff.php on line 280 (Internal.Exception)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
We are already working on upgrading woocommerce-sniffs with #11724.
To reproduce
Steps to reproduce the behavior:
- Ensure that you are using PHP 8.x.
- Run
npm run lint:php. - See the errors.
Metadata
Metadata
Assignees
Labels
status: staleStale issues and PRs have had no updates for 60 days.Stale issues and PRs have had no updates for 60 days.team: Kirigami & Origamitype: cooldownThings that are queued for a cooldown period (assists with planning).Things that are queued for a cooldown period (assists with planning).type: dependenciesPull requests that update a dependency file (used by renovate).Pull requests that update a dependency file (used by renovate).