PHPackages                             district09/qa-php - 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. district09/qa-php

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

district09/qa-php
=================

Quality Assurance tools and configuration for PHP projects and packages.

2.2.1(10mo ago)03.0k↓28.9%7MITPHPPHP ^8.1

Since Aug 16Pushed 10mo ago3 watchersCompare

[ Source](https://github.com/district09/php_package_qa-php)[ Packagist](https://packagist.org/packages/district09/qa-php)[ Docs](https://github.com/digipolisgent/php_package_qa-php)[ RSS](/packages/district09-qa-php/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (6)Dependencies (15)Versions (9)Used By (7)

Quality Assurance - PHP
=======================

[](#quality-assurance---php)

This package provides a set of Quality Assurance tools and configuration files for PHP projects and packages (libraries).

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

[](#requirements)

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

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

[](#installation)

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

```
"grumphp": {
    "config-default-path": "vendor/district09/qa-php/configs/grumphp.yml"
}
```

Add the qa-php package as dev requirement:

```
composer require --dev district09/qa-php:^2.0
```

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.
- `GLOBAL` to skip for example the by qa-php 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 created, from the examples within vendor/qa-php/config or by the project specific files within your project or package root directory. The generated files are also stored in the same project/package root. You can recognize these files by the `.qa-php.`suffix.

**These files should not be committed!** Add them to the `.gitignore` file:

```
/*.qa-php.*
```

### 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 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-php.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-php.xml` : PHP\_CodeSniffer config file.
- `phpmd.qa-php.xml` : PHP Mess Detector config file.
- `phpunit.qa-php.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-php.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-php.xml`.
- Languages &amp; Frameworks &gt; PHP &gt; Test Frameworks &gt; Test Runner Set "Default configuration file" to `phpunit.qa-php.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 ./
```

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance54

Moderate activity, may be stable

Popularity21

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 65.9% of commits — single point of failure

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 ~177 days

Recently: every ~264 days

Total

7

Last Release

307d ago

Major Versions

1.1.0 → 2.0.02024-03-28

PHP version history (2 changes)1.0.0PHP ^7.3|^8.0

2.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/fd0af1f056fd3baa2df55c0c745ade4d0f8af99505f717bf0ad48d7b615a2153?d=identicon)[Jelle-S](/maintainers/Jelle-S)

![](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 (29 commits)")[![dubgeiser](https://avatars.githubusercontent.com/u/290589?v=4)](https://github.com/dubgeiser "dubgeiser (6 commits)")[![jonasanne](https://avatars.githubusercontent.com/u/32570643?v=4)](https://github.com/jonasanne "jonasanne (5 commits)")[![MPParsley](https://avatars.githubusercontent.com/u/1823998?v=4)](https://github.com/MPParsley "MPParsley (4 commits)")

---

Tags

d09check22webphpqadistrict09

### Embed Badge

![Health badge](/badges/district09-qa-php/health.svg)

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

###  Alternatives

[drupal/core-dev

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

2021.0M277](/packages/drupal-core-dev)[youwe/testing-suite

Contains Youwe's default testing packages for php.

13176.9k8](/packages/youwe-testing-suite)[wp-cli/wp-cli-tests

WP-CLI testing framework

422.7M87](/packages/wp-cli-wp-cli-tests)

PHPackages © 2026

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