squizlabs / PHP_CodeSniffer

PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.
BSD 3-Clause "New" or "Revised" License
10.66k stars 1.48k forks source link

How to install PSR4 #3475

Closed GeoffreyOlivier closed 2 years ago

GeoffreyOlivier commented 2 years ago

Hello, I would like install PSR4, I can't find how to install.

ERROR: the "PSR4" coding standard is not installed. The installed coding standards are MySource, PEAR, PSR1, PSR12, PSR2, Squiz, Zend, CodeatCodingStandard, PHPCompatibility, PHPCompat
ibilityParagonieRandomCompat, PHPCompatibilityParagonieSodiumCompat, PHPCompatibilityWP, SlevomatCodingStandard, WordPress, WordPress-Core, WordPress-Docs and WordPress-Extra
To skip commit checks, add -n or --no-verify flag to commit command

C:\wamp64\www\wordpress\wp-content\plugins\sync-woocommerce>phpcs -i The installed coding standards are MySource, PEAR, PSR1, PSR12, PSR2, Squiz and Zend

Thanks for your help

jrfnl commented 2 years ago

As far as I know there is no PSR-4 standard available, not in PHPCS itself, not in userland.

GeoffreyOlivier commented 2 years ago

Oh ok, thanks.

lgedeon commented 2 years ago

What about https://github.com/suin/phpcs-psr4-sniff? Is this something that could be included as optional?