PHPackages                             eonx-com/easy-quality - 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. eonx-com/easy-quality

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

eonx-com/easy-quality
=====================

Makes using of code quality tools for PHP projects of EonX easier

5.5.0(1mo ago)5843.5k↓24%MITPHPPHP ~8.2CI passing

Since May 5Pushed 1mo ago13 watchersCompare

[ Source](https://github.com/eonx-com/easy-quality)[ Packagist](https://packagist.org/packages/eonx-com/easy-quality)[ RSS](/packages/eonx-com-easy-quality/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (23)Versions (162)Used By (0)

\---eonx\_docs--- title: Introduction weight: 0 ---eonx\_docs---

This package is a way to centralise reusable classes used for coding standards and quality tools. It contains:

- [Rectors](https://github.com/rectorphp/rector)
- [Sniffs](https://github.com/squizlabs/PHP_CodeSniffer)

### Install (separately from the project's composer.json file)

[](#install-separately-from-the-projects-composerjson-file)

1. Create a `quality` directory in your project root.
2. Go to the `quality` directory and run `composer require eonx-com/easy-quality`.
3. Set env variables to speed up local execution:

    - `EONX_EASY_QUALITY_JOB_SIZE` - number of files to process in parallel (default: 2)
    - `EONX_EASY_QUALITY_MAX_NUMBER_OF_PROCESS` - maximum number of parallel processes (default: 4)
    - `EONX_EASY_QUALITY_TIMEOUT_SECONDS` - timeout in seconds for each process (default: 120)
4. Add `quality/vendor` to Git ignore (either in a `.gitignore` file inside the `quality` directory or in you project's root `.gitignore` file).
5. Update your project's `composer.json` file by adding a post-install script (this will automate an installation of `eonx-com/easy-quality` on all the local machines):

    ```
    {
        "post-install-cmd": [
            "cd quality && composer install --no-dev"
        ]
    }
    ```
6. Update your project's `composer.json` file by adding the following scripts. Here we use `veewee/composer-run-parallel` (install it as a **dev** dependency) for the `check-all` script to run multiple commands in parallel. Feel free to modiy these commands as you wish.

    ```
    {
        "scripts": {
            "check-all": "@parallel check-security check-ecs check-rector check-phpmd-app check-phpmd-tests check-phpstan",
            "check-ecs": "php -d memory_limit=1024M quality/vendor/bin/ecs check --clear-cache",
            "check-phpmd-app": "quality/vendor/bin/phpmd src ansi phpmd.app.xml",
            "check-phpmd-tests": "quality/vendor/bin/phpmd tests ansi phpmd.tests.xml",
            "check-phpstan": "quality/vendor/bin/phpstan analyse --ansi --memory-limit=1000M",
            "check-rector": "quality/vendor/bin/rector process --dry-run"
        }
    }
    ```
7. Make sure you have config files for ECS, Rector, PHP Mess Detector, and PHPStan in the project source code root.
8. Run `composer check-all` from the project source code root to make sure everything is working and fix the found issues.
9. If you want to use the quality tools in CI, here is an example of a GitHub action configuration:

    ```
        coding-standards:
            needs: composer
            runs-on: ubuntu-latest
            timeout-minutes: 60
            strategy:
                fail-fast: false
                matrix:
                    php: ['8.2']
                    actions:
                        - {name: phpstan, run: composer check-phpstan}
                        - {name: phpmd-app, run: composer check-phpmd-app}
                        - {name: phpmd-tests, run: composer check-phpmd-tests}
                        - {name: rector, run: composer check-rector}
                        - {name: security, run: composer check-security}
                        - {name: yaml-linter, run: './bin/console lint:yaml config src translations --parse-tags'}
                        - {name: ecs, run: composer check-ecs}
            env:
                EONX_EASY_QUALITY_JOB_SIZE: 20
                EONX_EASY_QUALITY_MAX_NUMBER_OF_PROCESS: 32
                EONX_EASY_QUALITY_TIMEOUT_SECONDS: 120

            name: ${{ matrix.actions.name}} (${{ matrix.php }})

            steps:
                -
                    uses: actions/checkout@v4

                -
                    uses: shivammathur/setup-php@v2
                    with:
                        php-version: ${{ matrix.php }}
                        coverage: none

                -
                    name: Get the cached Composer dependencies
                    uses: actions/cache@v4
                    with:
                        path: src/vendor
                        key: composer-${{ hashFiles('src/composer.lock') }}

                -
                    name: Get the cached quality tools installation
                    id: cache-quality-tools
                    uses: actions/cache@v4
                    with:
                        path: quality/vendor
                        key: quality-tools-composer-${{ hashFiles('quality/composer.lock') }}

                -
                    name: Install quality tools
                    if: steps.cache-quality-tools.outputs.cache-hit == false
                    run: composer --working-dir=../quality install --prefer-dist --no-scripts --no-progress --no-interaction --no-dev

                -
                    name: Check ${{ matrix.actions.name }}
                    run: ${{ matrix.actions.run }}
                    shell: bash
    ```

### Prepare configuration file for ECS (Easy Coding Standard) Sniffs

[](#prepare-configuration-file-for-ecs-easy-coding-standard-sniffs)

Create a configuration file for ECS in the `quality` folder of the project.

For example see [quality/ecs.php](quality/ecs.php).

### Run ECS check

[](#run-ecs-check)

Go to the root folder of the project and run

```
composer check-ecs
```

or

```
quality/vendor/bin/ecs check
```

Expected output:

```
[OK] No errors found. Great job - your code is shiny in style!

```

### Prepare configuration file for Rector

[](#prepare-configuration-file-for-rector)

Create a configuration file for Rector in the `quality` folder of the project.

For example see [quality/rector.php](quality/rector.php).

### Run Rector check

[](#run-rector-check)

Go to the root folder of the project and run

```
composer check-rector
```

or

```
quality/vendor/bin/rector process --dry-run
```

Expected output:

```
[OK] Rector is done!

```

### Using phpmetrics checker

[](#using-phpmetrics-checker)

Run

```
quality/vendor/eonx-com/easy-quality/bin/pmc.phar --config=quality/pmc.json
```

An example of `pmc.json` config file:

```
{
    "paths": [
        "../src/src"
    ],
    "metrics": {
        "efferentCoupling": {
            "skip": [
                "App\\Entity\\SomeEntity",
                "App\\*\\ApiResource\\*",
                "*Dto"
            ],
            "maxValue": 14
        },
        "cyclomaticComplexity": {
            "skip": [
                "App\\Service\\*"
            ],
            "maxValue": 10
        },
    }
}
```

###  Health Score

63

—

FairBetter than 99% of packages

Maintenance90

Actively maintained with recent releases

Popularity42

Moderate usage in the ecosystem

Community18

Small or concentrated contributor base

Maturity83

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

Total

78

Last Release

54d ago

Major Versions

1.x-dev → 2.0.02022-01-28

2.0.7 → 3.0.02022-06-14

3.7.2 → 4.0.02024-06-17

4.3.0 → 5.0.02025-02-26

5.5.0 → 6.x-dev2026-03-26

PHP version history (6 changes)0.1.0PHP ^7.3

1.0.0PHP ^7.3 || ^8.0

2.0.0PHP ~8.0

3.0.0PHP ~8.1

4.0.0PHP ~8.2

6.x-devPHP ~8.4

### Community

Maintainers

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

---

Top Contributors

[![alexndlm](https://avatars.githubusercontent.com/u/6824784?v=4)](https://github.com/alexndlm "alexndlm (92 commits)")[![ERuban](https://avatars.githubusercontent.com/u/13186130?v=4)](https://github.com/ERuban "ERuban (54 commits)")[![roman-eonx](https://avatars.githubusercontent.com/u/48544017?v=4)](https://github.com/roman-eonx "roman-eonx (18 commits)")[![BOB41K1987](https://avatars.githubusercontent.com/u/20467102?v=4)](https://github.com/BOB41K1987 "BOB41K1987 (13 commits)")[![alexandrtspl](https://avatars.githubusercontent.com/u/90907144?v=4)](https://github.com/alexandrtspl "alexandrtspl (6 commits)")[![voodooism](https://avatars.githubusercontent.com/u/31572316?v=4)](https://github.com/voodooism "voodooism (4 commits)")[![itorgov](https://avatars.githubusercontent.com/u/1703419?v=4)](https://github.com/itorgov "itorgov (2 commits)")[![natepage](https://avatars.githubusercontent.com/u/11576446?v=4)](https://github.com/natepage "natepage (1 commits)")[![DKeeper](https://avatars.githubusercontent.com/u/1589751?v=4)](https://github.com/DKeeper "DKeeper (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/eonx-com-easy-quality/health.svg)

```
[![Health](https://phpackages.com/badges/eonx-com-easy-quality/health.svg)](https://phpackages.com/packages/eonx-com-easy-quality)
```

###  Alternatives

[wp-cli/wp-cli-tests

WP-CLI testing framework

422.7M87](/packages/wp-cli-wp-cli-tests)[youwe/testing-suite

Contains Youwe's default testing packages for php.

13176.9k8](/packages/youwe-testing-suite)[savinmikhail/add_named_arguments_rector

Rector rule to add names to arguments for functions'/methods' calls

1969.5k3](/packages/savinmikhail-add-named-arguments-rector)

PHPackages © 2026

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