smartbees / coding-standards-drupal
2.6.0
2025-07-28 06:01 UTC
Requires
- composer-runtime-api: ^2.2
- acquia/coding-standards: ^2.0
- armin/editorconfig-cli: ^2.1.0
- dealerdirect/phpcodesniffer-composer-installer: ^1.1
- drupal/coder: ^8.3.30
- mglaman/phpstan-drupal: ^2.0.7
- phpstan/phpstan: ^2.1.20
- phpstan/phpstan-deprecation-rules: ^2.0.3
- phpstan/phpstan-strict-rules: ^2.0.6
- slevomat/coding-standard: ^8.20
- squizlabs/php_codesniffer: ^3.13.2
- symfony/console: ^6.4 || ^7.1
- vincentlanglet/twig-cs-fixer: ^3.8.1
- wotnak/twig-cs-fixer-drupal: ^2.0.0
Requires (Dev)
- ergebnis/composer-normalize: ^2.42
README
# Install coding standards.
composer req --dev smartbees/coding-standards-drupal
vendor/bin/sbcs init
# Add 'sbcs init' to the 'post-update-cmd' scripts in the composer.json file
# to automatically install the coding standards configs updates when they are
# available.
...
"scripts": {
"post-update-cmd": [
"vendor/bin/sbcs init"
],
...
# Run static analysis of the code.
vendor/bn/sbcs check
# Execute automatic code style fixes.
vendor/bin/sbcs check --fix