You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The PHP Codesniffer Standard installer is able to install phpcs codesniffer
standards into the <vendor>/squizlabs/php_codesniffer/CodeSniffer/Standards/
folder. By doing so the standard will be usable by calling bin/phpcs --standard <standard>.
How To Use
Find the package containing the codesniffs you want to use. This package should be
a normal Codesniffing package containing a ruleset.xml and a composer.json.
The composer package type has to be phpcodesniffer-standard
The name of the package has to reflect the name of the standard (explained below)
It's best if the package has a requirement to simplyadmire/composer-plugins. This
is the only way to be sure the installer is available before the package is installed.
Now add the package as a development dependency to your project
Run bin/phpcs -i and see your standard listed
Naming Rules
The name of the standard is derived from the composer packagekey. The part after the /
is taken as standard name. The first character is made uppercase, and all characters after
a - will be uppercased. So:
vendor/mysniffs becomes Mysniffs
vendor/some-more-words becomes SomeMoreWords
TYPO3 Specific
The TYPO3 community already has packages available on packagist, and as renaming packagenames
would be a bad practice we added 3 hardcoded standard names. Also the vendor name TYPO3 will
always be enforced to be uppercase.
To include the TYPO3 CGL to your project you can use one of the following commands (depending
on the CGL you want to use, TYPO3 Flow or TYPO3 CMS):