Set of modules and libraries and configurations that helps quality assurance in Drupal.
- phpcs.xml.dist gets symlinked to the Composer project root if it does not exist
- phpstan.neon.dist and phpstan.baseline.neon gets copied to the Composer project root if they do not exist
- !!! ./vendor/bin/drupal-check binary gets replaced with our custom DrupalCheck-PHPStan bridge for the sake of backward compatibility with previous 3.x versions
composer drupalqa:phpcs:config-install
- installs Pronovix's PHP CodeSniffer configuration for Drupal projects (the plugin tries to install it automatically when it gets installed)composer drupalqa:testrunner:download
- installs latest version of Pronovix's TestRunner Go application from Github. (You can avoid API rate limit error if you configure your Github OAuth access token.)drupalqa:phpstan:install-drupal-check-bridge
Installs the DrupalCheck-PHPStan bridgedrupalqa:phpstan:ensure-configs-exist
ensures base configurations for PHPStan (stored in ./config/skeletons/) are available in Composer project root
composer normalize
- Normalizes the composer.json (provided bylocalheinz/composer-normalize
)Deprecated use./vendor/bin/drupal-check
- Checks Drupal 9+ code for deprecations and code quality issues../vendor/bin/phpstan
directly instead either with the provided PHPStan configs or a custom one.mglaman/drupal-check
package dependency was removed in 3.8.0 and replaced with a best effort but still dummy command that proxies every./vendor/bin/drupal-check
call to./vendor/bin/phpstan
../vendor/bin/twigcs
- Checks TWIG files for violations on coding standards. (provided byfriendsoftwig/twigcs
)
- Composer Normalize: https://github.com/localheinz/composer-normalize
- PHP CodeSniffer Standards Composer Installer Plugin: https://github.com/Dealerdirect/phpcodesniffer-composer-installer
Drupal Check: https://github.com/mglaman/drupal-check- PHPStan: https://github.com/phpstan/phpstan
- Slevomat Coding Standard: https://github.com/slevomat/coding-standard
- Behat Screenshot Extension: https://github.com/elvetemedve/behat-screenshot
- Behat Drupal Extension: https://github.com/jhedstrom/drupalextension
Plus various other packages (like Drupal Coder, PHPUnit, etc.) required by webflo/drupal-core-require-dev.
ALL classes, interfaces in this project are internal and not meant to be used by other projects. No backward-compatibility promise is given for these.
Running QA checks:
- First fix auto-fixable issues with
composer lint:fix && composer static:fix
- then run checks
composer lint:check && composer static:check