pronovix / drupal-qa
QA tools for Drupal.
Installs: 19 798
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 6
Forks: 3
Type:composer-plugin
Requires
- php: ~7.4.0 || ~8.1.6
- composer-plugin-api: ^1.1 || ^2.0
- behat/behat: ^3.9.0
- behat/mink: ^1.8
- bex/behat-screenshot: ^2.0.1
- cweagans/composer-patches: ^1.7
- dealerdirect/phpcodesniffer-composer-installer: ^0.7.0
- drupal/core-dev: ~9.4.4
- drupal/drupal-extension: ^3.4 || ^4.1.0
- drush/drush: ^11.0
- ergebnis/composer-normalize: ^2.13.0
- friendsoftwig/twigcs: ^6.0
- instaclick/php-webdriver: ^1.4.5
- mglaman/phpstan-drupal: ^1.1
- phpspec/prophecy-phpunit: ^2
- phpstan/phpstan: ^1.8.11
- phpstan/phpstan-deprecation-rules: ^1.0
- pronovix/composer-logger: ^3.0
- slevomat/coding-standard: ^7.0
- dev-master / 3.x-dev
- 3.10.0-alpha3
- 3.10.0-alpha2
- 3.10.0-alpha1
- 3.9.1
- 3.9.1-alpha2
- 3.9.1-alpha1
- 3.9.0
- 3.9.0-alpha1
- 3.8.0
- 3.8.0-alpha2
- 3.8.0-alpha1
- 3.7.0
- 3.7.0-alpha4
- 3.7.0-alpha3
- 3.7.0-alpha2
- 3.7.0-alpha1
- 3.6.0
- 3.6.0-alpha2
- 3.6.0-alpha1
- 3.5.2
- 3.5.2-alpha1
- 3.5.1
- 3.5.1-alpha2
- 3.5.1-alpha1
- 3.5.0
- 3.5.0-alpha2
- 3.5.0-alpha1
- 3.4.1
- 3.4.0
- 3.4.0-alpha6
- 3.4.0-alpha5
- 3.4.0-alpha4
- 3.4.0-alpha3
- 3.4.0-alpha2
- 3.4.0-alpha1
- 3.3.3
- 3.3.2
- 3.3.1
- 3.3.0
- 3.3.0-alpha2
- 3.3.0-alpha1
- 3.2.0
- 3.2.0-alpha3
- 3.2.0-alpha2
- 3.2.0-alpha1
- 3.1.3
- 3.1.3-alpha1
- 3.1.2
- 3.1.1
- 3.1.1-alpha1
- 3.1.0
- 3.1.0-alpha1
- 3.0.1
- 3.0.0
- 3.0.0-alpha4
- 3.0.0-alpha3
- 3.0.0-alpha2
- 3.0.0-alpha1
- 2.x-dev
- 2.14.4
- 2.14.4-alpha1
- 2.14.3
- 2.14.2
- 2.14.1
- 2.14.0
- 2.14.0-alpha2
- 2.14.0-alpha1
- 2.13.0
- 2.13.0-alpha2
- 2.13.0-alpha1
- 2.12.1
- 2.12.1-alpha2
- 2.12.1-alpha1
- 2.12.0
- 2.12.0-alpha5
- 2.12.0-alpha4
- 2.12.0-alpha3
- 2.12.0-alpha2
- 2.12.0-alpha1
- 2.11.3
- 2.11.2
- 2.11.2-alpha1
- 2.11.1
- 2.11.0
- 2.11.0-alpha5
- 2.11.0-alpha4
- 2.11.0-alpha3
- 2.11.0-alpha2
- 2.11.0-alpha1
- 2.10.0
- 2.10.0-alpha1
- 2.9.0
- 2.9.0-alpha2
- 2.9.0-alpha1
- 2.8.0
- 2.8.0-alpha5
- 2.8.0-alpha4
- 2.8.0-alpha3
- 2.8.0-alpha2
- 2.8.0-alpha1
- 2.7.0
- 2.7.0-alpha2
- 2.7.0-alpha1
- 2.6.0
- 2.6.0-alpha3
- 2.6.0-alpha2
- 2.6.0-alpha1
- 2.5.0
- 2.5.0-alpha2
- 2.5.0-alpha1
- 2.4.3-alpha3
- 2.4.3-alpha2
- 2.4.3-alpha1
- 2.4.2
- 2.4.1
- 2.4.0
- 2.4.0-alpha1
- 2.3.1
- 2.3.0
- 2.3.0-alpha2
- 2.3.0-alpha1
- 2.2.0
- 2.2.0-alpha3
- 2.2.0-alpha2
- 2.2.0-alpha1
- 2.1.4
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1.0
- 2.1.0-alpha1
- 2.0.0
- 2.0.0-alpha11
- 2.0.0-alpha10
- 2.0.0-alpha9
- dev-3.9.0-alpha1
This package is auto-updated.
Last update: 2023-02-01 11:36:31 UTC
README
Set of modules and libraries and configurations that helps quality assurance in Drupal.
Automated tasks executed when this plugin is installed
- 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
Available commands
Drupal QA commands
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
3rd-party commands
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
)
Packages included
Code quality
- 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
Testing
- 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.
Development notes
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