Repository navigation
Project local installation hangs / never finishes (vendor/bin/phpcs -ps . --standard=WordPress stuck at 44%) #2785
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Description
Bug Description
Project local installation hangs / never finishes.
What did you expect to happen? What actually happened?
Project local installation finishes without any errors.
Minimal Code Snippet
The issue happens when running this command:
composer config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
composer require wp-coding-standards/wpcs --with-dependencies
# Project local install (very long)
vendor/bin/phpcs -ps . --standard=WordPressError Code
vendor/bin/phpcs -ps . --standard=WordPress
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 60 / 1779 (3%)
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 120 / 1779 (7%)
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 180 / 1779 (10%)
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 240 / 1779 (13%)
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 300 / 1779 (17%)
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 360 / 1779 (20%)
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE.EEEEEEEEEEEEEEEEEEEEEEE 420 / 1779 (24%)
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 480 / 1779 (27%)
EEEEEEEEEEWEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 540 / 1779 (30%)
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 600 / 1779 (34%)
EEEEEEEEEEEEE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EEEEEEEEEE.EEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 660 / 1779 (37%)
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 720 / 1779 (40%)
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 780 / 1779 (44%)
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE^CEnvironment
PHP 8.5, also tested with PHP 8.1, fails equally.
composer require wp-coding-standards/wpcs --with-dependencies
The package you required is recommended to be placed in require-dev (because it is tagged as "static analysis") but you did not use --dev.
Do you want to re-run the command with --dev? [yes]? n
./composer.json has been updated
Running composer update wp-coding-standards/wpcs --with-dependencies
Loading composer repositories with package information
Updating dependencies
Lock file operations: 5 installs, 0 updates, 0 removals
- Locking dealerdirect/phpcodesniffer-composer-installer (v1.2.1)
- Locking phpcsstandards/phpcsextra (1.5.1)
- Locking phpcsstandards/phpcsutils (1.2.3)
- Locking squizlabs/php_codesniffer (3.13.6)
- Locking wp-coding-standards/wpcs (3.4.1)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 5 installs, 0 updates, 0 removals
- Downloading wp-coding-standards/wpcs (3.4.1)
- Installing squizlabs/php_codesniffer (3.13.6): Extracting archive
- Installing dealerdirect/phpcodesniffer-composer-installer (v1.2.1): Extracting archive
- Installing phpcsstandards/phpcsutils (1.2.3): Extracting archive
- Installing phpcsstandards/phpcsextra (1.5.1): Extracting archive
- Installing wp-coding-standards/wpcs (3.4.1): Extracting archive
Generating autoload files
5 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
PHP CodeSniffer Config installed_paths set to ../../phpcsstandards/phpcsextra,../../phpcsstandards/phpcsutils,../../wp-coding-standards/wpcs
No security vulnerability advisories found.
Using version ^3.4 for wp-coding-standards/wpcsAdditional Context (optional)
When PHP is stuck with the phpcs command, it consumes about 8% CPU and memory just rises slowly but infinitely.
Is there any CLI argument I could add to the command to help debug?
Reactions are currently unavailable
Activity
[-]Project local installation hangs / never finishes (vendor/bin/phpcs -ps . --standard=WordPress sutck at 44%)[/-][+]Project local installation hangs / never finishes (vendor/bin/phpcs -ps . --standard=WordPress stuck at 44%)[/+]francoisjacquet commentedon Oct 19, 2026
The following PHP extensions are activated:
If this is of any use, I am running Debian 13.
jrfnl commentedon Oct 19, 2026
@francoisjacquet This sounds like it's not a WPCS problem, but a PHPCS problem, so you might want to report it upstream instead.
Either way, you will first need to identify what PHPCS gets stuck on, as the information provided now does not allow for debugging by maintainers as we a) don't have access to your machine and b) don't have access to the project you are running PHPCS on.
So, to isolate the problem, I suggest you:
-v(debug level 1) added to identify the file PHPCS gets stuck on.vendor/bin/phpcs -ps . --standard=WordPress -v-vv(debug level 2).You should be able to identify where PHPCS runs into trouble from the output towards the end, which should show which sniff is the last one being called (before the program hangs). If the sniff name starts with
WordPress, the problem belongs in this repository, otherwise, identify the repository the sniff originates from and please report the problem there.francoisjacquet commentedon Oct 20, 2026
Hello @jrfnl
Thank you for your reply.
Actually, one doesn't need to perform this so called "Project local install" step mentioned in the README. Labeling this as such was misleading to me.
The composer require command is enough to have the WordPress coding standards.
Closing.
jrfnl commentedon Oct 20, 2026
@francoisjacquet I have no clue what you mean. Without installing the project - either locally or globally -, you cannot run it and the running is what you say ran into problems. You might be confusing terminology ? Either way, glad to hear your problem is solved.
francoisjacquet commentedon Oct 20, 2026
I meant the
command is enough to install the WPCS.
The README mentions this command:
This command does not actually install anything, the comment above it is misleading.
Hoping this is more clear.
Thank you.
jrfnl commentedon Oct 20, 2026
@francoisjacquet Eh... that command example is in a section called "Using your WordPressCS install". Not sure how we can make it clearer that that's not part of "installing", but showing you how to use the installed packages....
Nothing misleading about it.
francoisjacquet commentedon Oct 20, 2026
Well, let's just say I am reading too fast and just read "install" in the comment so I ran the command without thinking twice about it 😄
But I am surely not the only one. People don't read anymore, they scan for keywords.
And technically, the "Using your WordPressCS install" section is under the "Installation" section.