PHPackages                             digipolisgent/qa-drupal - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. digipolisgent/qa-drupal

ActiveLibrary[Testing &amp; Quality](/categories/testing)

digipolisgent/qa-drupal
=======================

Quality Assurance tools and configuration for Drupal websites and extensions.

4.1.4(1mo ago)273.3k↓74.6%1MITPHPPHP ^8.3

Since Sep 9Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/district09/php_package_qa-drupal)[ Packagist](https://packagist.org/packages/digipolisgent/qa-drupal)[ RSS](/packages/digipolisgent-qa-drupal/feed)WikiDiscussions develop Synced 2d ago

READMEChangelog (10)Dependencies (34)Versions (91)Used By (1)

Quality Assurance - 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).

[![Build Status Master](https://camo.githubusercontent.com/89a7299ce3927ee5a2b7c7b3aa60b539ae13023b583c1dd07bb2c10cb099fcd2/68747470733a2f2f6170692e7472617669732d63692e636f6d2f646973747269637430392f7068705f7061636b6167655f71612d64727570616c2e7376673f6272616e63683d646576656c6f70 "Travis build develop")](https://travis-ci.com/github/district09/php_package_qa-drupal/branches)[![Maintainability](https://camo.githubusercontent.com/9ac3656430798d03f58963733508806b0e2b6354c28b79ad08f84866c972fdcb/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f64336436643230666263366566623039333337652f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/district09/php_package_qa-drupal/maintainability)[![License](https://camo.githubusercontent.com/7b82b4768d7390189ae328de6a9ee3c2bb20185825f3b7d9eadf2d783d24fe69/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f64696769706f6c697367656e742f71612d64727570616c)](LICENSE.md)

Requirements
------------

[](#requirements)

- [Composer](https://getcomposer.org)

Versions
--------

[](#versions)

The versions support different PHP &amp; Drupal versions:

- Until 1.4.x : PHP 7.3 or 7.4 &amp; Drupal 8.8+ or 9+.
- From 1.5.x : PHP 7.4 &amp; Drupal 9.1 or higher.
- From 1.7.X : PHP 7.4, 8.X &amp; DRUPAL 9.3 or higher.
- From 3.0.x : PHP 8.3, DRUPAL 10.3 or higher.

Installation
------------

[](#installation)

The installation depends on the type of project: website or Drupal module.

### Drupal website

[](#drupal-website)

Add the `grumphp` entry to the `extra` section of your `composer.json`.

```
"grumphp": {
    "config-default-path": "vendor/digipolisgent/qa-drupal/configs/grumphp-site.yml"
}
```

Add the qa-drupal package as dev requirement:

```
composer require --dev digipolisgent/qa-drupal:^1.5
```

### Drupal module

[](#drupal-module)

Add the `grumphp` entry to the `extra` section of your `composer.json`.

```
"grumphp": {
    "config-default-path": "vendor/digipolisgent/qa-drupal/configs/grumphp-extension.yml"
}
```

Add the qa-drupal package as dev requirement:

```
composer require --dev digipolisgent/qa-drupal:^1.5
```

Configuration
-------------

[](#configuration)

### General

[](#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`:

```
/*.local.*
```

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:

```
[FILENAME]_SKIP_[TYPE]=1

```

Wherein `[FILENAME]` matches the configuration filename and `[TYPE]` is either:

- `LOCAL` to skip for example your `phpstan.local.neon` file.
- `PROJECT` to skip for example your `phpstan.neon` file.
- `PACKAGE_TYPE` to skip for example the provided `phpstan-extension.neon` or `phpstan-site.neon` file.
- `PACKAGE_GLOBAL` to skip for example the provided `phpstan.neon` file.

Other file types cannot be merged and will just override all other less specific files.

### PHPStan in deprecations only mode

[](#phpstan-in-deprecations-only-mode)

Create a `phpstan.neon` file and add following contents to ignore everything except deprecations:

```
parameters:
  customRulesetUsed: true
  ignoreErrors:
    - '#^(?:(?!deprecated).)*$#'

```

### Ignore automatically created config files

[](#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:

```
/*.qa-drupal.*
```

### Ignore PHPUnit build files

[](#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:

```
/build
/.phpunit.result.cache
```

### Run PHPUnit locally without coverage

[](#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 `` section from it.

Run GrumPHP
-----------

[](#run-grumphp)

GrumPHP will automatically run all tasks on the changed code on git commit and push.

You can run all tasks at once:

```
vendor/bin/grumphp
```

Or you can run one or more specific tasks manually by running:

```
vendor/bin/grumphp --tasks phpcs,phpmd
vendor/bin/grumphp --tasks phpunit
```

PHPStorm
--------

[](#phpstorm)

PHPStorm requires config files for PHP\_CodeSniffer, PHP Mess Detector &amp; 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 &gt; Inspections &gt; PHP &gt; Quality tools &gt; PHP Mess Detector validation Add `phpmd.qa-drupal.xml` to the "Custom rulesets".
- Editor &gt; Inspections &gt; PHP &gt; Quality tools &gt; PHP\_CodeSniffer validation Set "Coding Standard" to "Custom" and set the path to `phpcs.qa-drupal.xml`.
- Languages &amp; Frameworks &gt; PHP &gt; Test Frameworks &gt; Test Runner Set "Default configuration file" to `phpunit.qa-drupal.xml`.

CodeClimate
-----------

[](#codeclimate)

Update the `.codeclimate.yml` file within your project.

Make sure that you use the CodeClimate specific phpcs config file:

```
prepare:
  fetch:
    - url: "https://raw.githubusercontent.com/digipolisgent/php_package_qa-drupal/1.x/configs/phpcs-codeclimate.xml"
      path: ".phpcs.xml"
```

Make sure that you use the beta channel for the PHPCodeSniffer plugin:

```
plugins:
  phpcodesniffer:
    enabled: true
    channel: beta
    config:
      standard: ".phpcs.xml"
```

### PHP compatibility

[](#php-compatibility)

In order to check php compatibility you can use the phpcs `PHPCompatibility` sniff:

```
php vendor/bin/phpcs -p --ignore="*/vendor/*" --extensions=php,inc,module,install,theme --runtime-set testVersion 8.1 --standard=PHPCompatibility ./web/modules/contrib
```

###  Health Score

61

—

FairBetter than 98% of packages

Maintenance89

Actively maintained with recent releases

Popularity33

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity86

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~24 days

Recently: every ~93 days

Total

85

Last Release

57d ago

Major Versions

0.2.2 → 1.0.02020-09-28

1.8.1 → 2.0.02023-05-25

2.x-dev → 3.0.02024-08-06

3.x-dev → 4.0.0-alpha12025-03-18

PHP version history (6 changes)1.4.0PHP ^7.3

1.5.0PHP ^7.4

1.6.0PHP ^7.4 || ^8.1

1.7.1PHP ^7.4 || ^8.0

2.0.0PHP ^8.1

3.0.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/ec45173701ba2e7958fd8b51291f9f1d0edf4444bce07d44c0fabda7300368cf?d=identicon)[zero2one](/maintainers/zero2one)

---

Top Contributors

[![zero2one](https://avatars.githubusercontent.com/u/133124?v=4)](https://github.com/zero2one "zero2one (110 commits)")[![MPParsley](https://avatars.githubusercontent.com/u/1823998?v=4)](https://github.com/MPParsley "MPParsley (66 commits)")[![jonasanne](https://avatars.githubusercontent.com/u/32570643?v=4)](https://github.com/jonasanne "jonasanne (34 commits)")[![matthijs-va](https://avatars.githubusercontent.com/u/10596780?v=4)](https://github.com/matthijs-va "matthijs-va (31 commits)")[![Jelle-S](https://avatars.githubusercontent.com/u/1828542?v=4)](https://github.com/Jelle-S "Jelle-S (18 commits)")[![Michaelvdwalle](https://avatars.githubusercontent.com/u/107845806?v=4)](https://github.com/Michaelvdwalle "Michaelvdwalle (3 commits)")[![lennartvava](https://avatars.githubusercontent.com/u/25999316?v=4)](https://github.com/lennartvava "lennartvava (2 commits)")

---

Tags

d09check22web

### Embed Badge

![Health badge](/badges/digipolisgent-qa-drupal/health.svg)

```
[![Health](https://phpackages.com/badges/digipolisgent-qa-drupal/health.svg)](https://phpackages.com/packages/digipolisgent-qa-drupal)
```

###  Alternatives

[drupal/core-dev

require-dev dependencies from drupal/drupal; use in addition to drupal/core-recommended to run tests from drupal/core.

2022.6M343](/packages/drupal-core-dev)[ec-europa/toolkit

Toolkit packaged for Drupal projects based on Robo.

40252.8k34](/packages/ec-europa-toolkit)[wp-cli/wp-cli-tests

WP-CLI testing framework

423.1M142](/packages/wp-cli-wp-cli-tests)[axelerant/drupal-quality-checker

Code quality checking tools for Drupal project.

13205.2k1](/packages/axelerant-drupal-quality-checker)[youwe/testing-suite

Contains Youwe's default testing packages for php.

13191.0k8](/packages/youwe-testing-suite)[acquia/orca

A tool for testing a company's software packages together in the context of a realistic, functioning, best practices Drupal build

30919.1k](/packages/acquia-orca)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
