Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

npm run lint:php command doesn't work on PHP 8.x #11834

Open
gigitux opened this issue Nov 20, 2023 · 1 comment
Open

npm run lint:php command doesn't work on PHP 8.x #11834

gigitux opened this issue Nov 20, 2023 · 1 comment
Labels
status: stale Stale issues and PRs have had no updates for 60 days. team: Kirigami & Origami type: cooldown Things that are queued for a cooldown period (assists with planning). type: dependencies Pull requests that update a dependency file (used by renovate).

Comments

@gigitux
Copy link
Contributor

gigitux commented Nov 20, 2023

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:

  1. Ensure that you are using PHP 8.x.
  2. Run npm run lint:php.
  3. See the errors.
@gigitux gigitux added type: dependencies Pull requests that update a dependency file (used by renovate). type: cooldown Things that are queued for a cooldown period (assists with planning). labels Nov 20, 2023
@gigitux gigitux mentioned this issue Nov 20, 2023
13 tasks
Copy link
Contributor

This issue has been marked as stale because it has not seen any activity within the past 60 days. Our team uses this tool to help surface issues for review. If you are the author of the issue there's no need to comment as it will be looked at.

@github-actions github-actions bot added the status: stale Stale issues and PRs have had no updates for 60 days. label Jan 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: stale Stale issues and PRs have had no updates for 60 days. team: Kirigami & Origami type: cooldown Things that are queued for a cooldown period (assists with planning). type: dependencies Pull requests that update a dependency file (used by renovate).
Projects
None yet
Development

No branches or pull requests

2 participants