PHPackages                             emhernapa/drupal-qa-tools - 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. emhernapa/drupal-qa-tools

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

emhernapa/drupal-qa-tools
=========================

Quality assurance tools for Drupal projects: PHPStan, PHPMD, PHPCS, and Drupal coding standards.

11

Since Jun 20Pushed 11mo agoCompare

[ Source](https://github.com/emhernapa/drupal-qa-tools)[ Packagist](https://packagist.org/packages/emhernapa/drupal-qa-tools)[ RSS](/packages/emhernapa-drupal-qa-tools/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Drupal QA Tools
===============

[](#drupal-qa-tools)

Development tools for Drupal projects: PHPCS, PHPStan, PHPMD and Drupal coding standards ready to use.

🧠 Description
-------------

[](#-description)

This repository provides a ready-to-use configuration of static analysis tools and coding standards for Drupal projects. It includes:

- **PHPCS** with Drupal coding standards
- **PHPStan** for static code analysis
- **PHPMD** for detecting problematic code
- Predefined configuration files to facilitate integration

Ideal for integrating as a development dependency in multiple Drupal projects via Composer.

---

📦 Installation
--------------

[](#-installation)

1. Add the repository to your `composer.json`:

```
"repositories": {
    "drupal-qa-tools": {
        "type": "vcs",
        "url": "https://github.com/emhernapa/drupal-qa-tools"
    }
}
```

2. (Optional) Add the following scripts to create the config files to your `composer.json`:

```
"scripts": {
      "post-install-cmd": [
          "cp ./vendor/emhernapa/drupal-qa-tools/config/phpcs.xml phpcs.xml",
          "cp ./vendor/emhernapa/drupal-qa-tools/config/phpstan.neon phpstan.neon",
          "cp ./vendor/emhernapa/drupal-qa-tools/config/phpmd.xml phpmd.xml"
      ]
  }
```

3. Add the following scripts commangs to your `composer.json`:

```
"scripts": {
      "test-phpcs": "./vendor/bin/phpcs",
      "test-phpstan": "./vendor/bin/phpstan analyse",
      "test-phpmd": "./vendor/bin/phpmd web/modules/custom xml phpmd.xml"
  }
```

4. Require it as a development dependency:

```
composer require emhernapa/drupal-qa-tools --dev
```

5. (Optional) Copy the configuration files to your project root:

```
cp ./vendor/emhernapa/drupal-qa-tools/config/phpcs.xml .
cp ./vendor/emhernapa/drupal-qa-tools/config/phpstan.neon .
cp ./vendor/emhernapa/drupal-qa-tools/config/phpmd.xml .
```

---

🚀 Usage
-------

[](#-usage)

- **PHPCS**:

    ```
    ./vendor/bin/phpcs
    ```

    OR

    ```
    composer test-phpcs
    ```
- **PHPStan**:

    ```
    ./vendor/bin/phpstan analyse
    ```

    OR

    ```
    composer test-phpstan
    ```
- **PHPMD**:

    ```
    ./vendor/bin/phpmd web/modules/custom xml phpmd.xml
    ```

    OR

    ```
    composer test-phpmd
    ```

---

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/3ae9bd3fbc6a00e668c40543ac3927accb615872d39bb4980c92de92e9ff7055?d=identicon)[emhernapa](/maintainers/emhernapa)

---

Top Contributors

[![emhernapa](https://avatars.githubusercontent.com/u/19146572?v=4)](https://github.com/emhernapa "emhernapa (9 commits)")

### Embed Badge

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

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

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M570](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)

PHPackages © 2026

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