Download the PHP package digipolisgent/qa-drupal without Composer
On this page you can find all versions of the php package digipolisgent/qa-drupal. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download digipolisgent/qa-drupal
More information about digipolisgent/qa-drupal
Files in digipolisgent/qa-drupal
Package qa-drupal
Short Description Quality Assurance tools and configuration for Drupal websites and extensions.
License MIT
Informations about the package qa-drupal
Quality Assurance - Drupal
This package provides a set of Quality Assurance tools and configuration files for Drupal websites and extensions (modules, themes or profiles).
Requirements
Versions
The versions support different PHP & Drupal versions:
- Until 1.4.x : PHP 7.3 or 7.4 & Drupal 8.8+ or 9+.
- From 1.5.x : PHP 7.4 & Drupal 9.1 or higher.
- From 1.7.X : PHP 7.4, 8.X & DRUPAL 9.3 or higher.
- From 3.0.x : PHP 8.3, DRUPAL 10.3 or higher.
Installation
The installation depends on the type of project: website or Drupal module.
Drupal website
Add the grumphp entry to the extra section of your composer.json.
Add the qa-drupal package as dev requirement:
Drupal module
Add the grumphp entry to the extra section of your composer.json.
Add the qa-drupal package as dev requirement:
Configuration
General
If required you can extend or override the provided configuration file of a task. Simply create the matching configuration file in the root of your project.
For example, to override the provided phpcs.xml file you can either create a
phpcs.xml or phpcs.local.xml file.
Note that the .local. files should only be used for changes that shouldn't be
committed. Exclude them in .gitignore:
Yaml and Neon files will extend (merged into) the provided configuration file by
default. Create a .env or .env.local file and add following contents to
change this behaviour:
Wherein [FILENAME] matches the configuration filename and [TYPE] is either:
LOCALto skip for example yourphpstan.local.neonfile.PROJECTto skip for example yourphpstan.neonfile.PACKAGE_TYPEto skip for example the providedphpstan-extension.neonorphpstan-site.neonfile.PACKAGE_GLOBALto skip for example the providedphpstan.neonfile.
Other file types cannot be merged and will just override all other less specific files.
PHPStan in deprecations only mode
Create a phpstan.neon file and add following contents to ignore everything
except deprecations:
Ignore automatically created config files
Some GrumPHP tasks require a config file. These are automatically creacted, from
the examples within vendor/qa-drupal/config or by the project specific files
within your website or drupal module root directory. The generated files are
also stored in the same website/module root. You can recognize these files by
the .qa-drupal. suffix.
These files should not be committed! Add them to the .gitignore file:
Ignore PHPUnit build files
When the PHPUnit task runs, coverage report files are stored into the build
directory located in the root of your website/project. Add this file to the
.gitignore file:
Run PHPUnit locally without coverage
Running PHPUnit with coverage report is time-consuming. You can locally speed up
PHPUnit by copying the generated phpunit.qa-drupal.xml file to
phpunit.local.xml and remove the <logging> section from it.
Run GrumPHP
GrumPHP will automatically run all tasks on the changed code on git commit and push.
You can run all tasks at once:
Or you can run one or more specific tasks manually by running:
PHPStorm
PHPStorm requires config files for PHP_CodeSniffer, PHP Mess Detector & PhpUnit. Run the grumphp command at least once (successfully) to generate these files.
The files will be created as:
phpcs.qa-drupal.xml: PHP_CodeSniffer config file.phpmd.qa-drupal.xml: PHP Mess Detector config file.phpunit.qa-drupal.xml: PHPUnit config file.
Configure the paths to these files in PHPStorm:
- Editor > Inspections > PHP > Quality tools > PHP Mess Detector validation
Add
phpmd.qa-drupal.xmlto the "Custom rulesets". - Editor > Inspections > PHP > Quality tools > PHP_CodeSniffer validation
Set "Coding Standard" to "Custom" and set the path to
phpcs.qa-drupal.xml. - Languages & Frameworks > PHP > Test Frameworks > Test Runner
Set "Default configuration file" to
phpunit.qa-drupal.xml.
CodeClimate
Update the .codeclimate.yml file within your project.
Make sure that you use the CodeClimate specific phpcs config file:
Make sure that you use the beta channel for the PHPCodeSniffer plugin:
PHP compatibility
In order to check php compatibility you can use the phpcs PHPCompatibility sniff:
All versions of qa-drupal with dependencies
behat/mink Version ^1.13
behat/mink-browserkit-driver Version ^2.3
drupal/coder Version ^9.0
drupal/core Version ^11.1 || ^12.0
ergebnis/composer-normalize Version ^2.52
friendsoftwig/twigcs Version ^6.5
lullabot/mink-selenium2-driver Version ^1.7.4
lullabot/php-webdriver Version ^2.0.7
mglaman/phpstan-drupal Version ^2.0.15
nette/neon Version ^3.4
pdepend/pdepend Version ^2.16.1 || 3.x-dev
phpcompatibility/php-compatibility Version ^10.0@alpha
phpmd/phpmd Version ^2.15 || 3.x-dev
phpro/grumphp-shim Version ^2.0
phpspec/prophecy Version ^1.23
phpspec/prophecy-phpunit Version ^2.4
phpstan/phpstan-deprecation-rules Version ^2.0
phpunit/phpunit Version ^10.5.19 || ^11.5 || ^12.5
symfony/phpunit-bridge Version ^7.2 || ^8.1
systemsdk/phpcpd Version ^7.0.1 || ^8.0 || ^9.0