PHPackages                             rednaxe/project-quality-inspector - 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. [Framework](/categories/framework)
4. /
5. rednaxe/project-quality-inspector

ActiveLibrary[Framework](/categories/framework)

rednaxe/project-quality-inspector
=================================

Project Quality Inspector provides a pqi command which checks Projects good practices thanks to customisable rules

v1.8.0(8y ago)257MITPHPPHP ^5.6 || ^7.0

Since Mar 3Pushed 8y ago1 watchersCompare

[ Source](https://github.com/ReDnAxE/project-quality-inspector)[ Packagist](https://packagist.org/packages/rednaxe/project-quality-inspector)[ Docs](https://github.com/rednaxe/project-quality-inspector)[ RSS](/packages/rednaxe-project-quality-inspector/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (23)Used By (0)

Project Quality Inspector
-------------------------

[](#project-quality-inspector)

ProjectQualityInspector is a PHP script `pqi` which checks project custom good practices. This generic quality checking tool will check your projects through various configurable rules.

[![Latest Stable Version](https://camo.githubusercontent.com/314f213b66935cb60f0c1e713c57811081958037ccd2061e1a4e1d42a973a716/68747470733a2f2f706f7365722e707567782e6f72672f5265446e4178452f70726f6a6563742d7175616c6974792d696e73706563746f722f762f737461626c652e737667)](https://packagist.org/packages/ReDnAxE/project-quality-inspector)[![Latest Unstable Version](https://camo.githubusercontent.com/936851844c62aedb77e13598ea1dc377c6c952217aa6d7b379719ea6ae6aa943/68747470733a2f2f706f7365722e707567782e6f72672f5265446e4178452f70726f6a6563742d7175616c6974792d696e73706563746f722f762f756e737461626c652e737667)](https://packagist.org/packages/ReDnAxE/project-quality-inspector)[![Total Downloads](https://camo.githubusercontent.com/d428dc860ab841c97080fd84c28b999dbb2265e5f8f68912df08a77313c525f7/68747470733a2f2f706f7365722e707567782e6f72672f5265446e4178452f70726f6a6563742d7175616c6974792d696e73706563746f722f646f776e6c6f616473)](https://packagist.org/packages/ReDnAxE/project-quality-inspector)[![Minimum PHP Version](https://camo.githubusercontent.com/86e7d829a466cacd5658a22073e27d49d39dac72cc18216ac4963ed5463c5bbc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230352e362d3838393242462e7376673f7374796c653d666c61742d737175617265)](https://php.net/)[![Build Status](https://camo.githubusercontent.com/5c352fb6e8b15ea76106a5ba626911bfef6724badda433e7f3cbb0d12ed72fb0/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f5265446e4178452f70726f6a6563742d7175616c6974792d696e73706563746f722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/ReDnAxE/project-quality-inspector)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/f2793addfee53570a25fa04d29470760d326e8235fc608586d277715483c672b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f5265446e4178452f70726f6a6563742d7175616c6974792d696e73706563746f722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ReDnAxE/project-quality-inspector/?branch=master)[![License](https://camo.githubusercontent.com/cae88f18b8f0c36d71528ead6cc56fadb6b104cb1f568732e771e1f1b09252a2/68747470733a2f2f706f7365722e707567782e6f72672f5265446e4178452f70726f6a6563742d7175616c6974792d696e73706563746f722f6c6963656e73652e737667)](https://packagist.org/packages/ReDnAxE/project-quality-inspector)

This tool is for you if you want to check in your project if :

- a file or directory (or a pathname pattern) should exist, or should not exist
- a composer package should exist, or should not exist
- a composer package version should not be wildcarded ...

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

[](#requirements)

ProjectQualityInspector requires PHP version 5.6 or greater

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

[](#installation)

You can install the component in 2 different ways:

- Install it via Composer (`rednaxe/project-quality-inspector` on [Packagist](https://packagist.org/packages/rednaxe/project-quality-inspector));

Simply add a (development-time) dependency on `rednaxe/project-quality-inspector` to your project's `composer.json` file if you use [Composer](https://getcomposer.org/) to manage the dependencies of your project:

```
composer require --dev rednaxe/project-quality-inspector ^1.6.0
```

- Use the official Git repository ().

You will need a recent git version (at least &gt;=2.7.0) to use git rule.

Usage
-----

[](#usage)

First, you have to create a pqi.yml configuration file in your project. If there is no configuration file in current directory, by default the example pqi.yml will be used.

The first level of configuration is up to you. When you will run the command, you have to specify the section in configuration file, for example :

```
$ ./bin/pqi mycustomconfig
```

For Symfony 2.\*, you will have to add `run` key like this :

```
$ ./bin/pqi run mycustomconfig
```

You can use `-c` or `--configFile`, and `-b` or `--baseDir` options to respectively change the configuration file, and the inspection base directory :

```
$ ./bin/pqi mycustomconfig -c config/pqi.yml -b Back/src
```

You can use `-j` or `--junitFile` to generate a JUnit file :

```
$ ./bin/pqi mycustomconfig -j pqi-junit.xml
```

You can use multiple `-r` or `--rules` to select rules to load :

```
$ ./bin/pqi mycustomconfig -r files-rule -r git-rule
```

You can also add a `common` section, which will be always merged to the selected section :

```
mycustomconfig:
    files-rule:
        config:
            - "appveyor.yml"
mysecondcustomconfig:
    files-rule:
        config:
            - ".travis.yml"
common:
    files-rule:
        config:
            - ".gitignore.yml"
```

Rules
-----

[](#rules)

A rule is loaded when the rule key is present in configuration. Here is a list of existing rules, and possible configurations :

- files-rule config example:

```
mycustomconfig:
    files-rule:
        config:
            - "ruleset.xml"
            - "app/phpunit.xml"
            - "!web/app_*.php"
            - { value: "web/app.php", grep: [ "getenv", "SYMFONY_ENV", "!$_ENV" ], reason: "This file is required and must use getenv php function to retrieve SYMFONY_ENV environment variable" }
            - { value: "app/phpunit.xml", reason: "This file is required for testing code" }
            - "composer.json"
            - "phpcs.xml"
            - "phpmd.xml"
            - "php-git-hooks.yml"
            - { value: "README.md", grep: "!Symfony Standard Edition" }
            - { value: "tests/", grep: "group" }
```

- composer-config-rule config example:

```
mycustomconfig:
    composer-config-rule:
        config:
            file: "composer.json"
            disallow-wildcard-versioning: true
            packages:
                - { value: "!h4cc/alice-fixtures-bundle", reason: "This package is no more maintained" }
                - "phpunit-bridge"
                - "bruli/php-git-hooks"
                - { value: "symfony/swiftmailer-bundle", semver: "^2.5.0" }
```

- git-rule

When we have more git branches than developers in a project, it's sometimes difficult to avoid merge conflicts. Then when it's time to build a package, it's generally too late to rebase, merge or clean each branch individually. In order to prevent any risk of unnecessary conflicts, this rule helps you to detect :

- large number of already merged branches (and suggests you to delete thoses branches)
- branches that should be updated because there is too much new commits in stable branch
- branches that should be updated because there is too days of work in stable branch

You will need a recent git version (at least &gt;=2.7.0) to use git rule.

config example:

```
mycustomconfig:
    git-rule:
        config:
            stable-branches-regex:
                - "origin/\\d\\+.\\d\\+.\\d\\+"
                - "origin/master"
            ignored-branches-regex: ~
            threshold-days-behind: "20" #in days
            threshold-commits-behind: "50"
            threshold-too-many-merged-branches: 5
```

TODO
----

[](#todo)

- Creating PHP Archive [PHP Archive (PHAR)](https://php.net/phar)
- Tests
- composer-config-rule: disallow-wildcard-versioning &gt; add current installed version in error message to facilitate explicit versioning correction
- composer-config-rule: check if there is a lot of updates to do, and if there is outdated packages installed
- curl-rule : create a curl rule which will be able to make requests and checks responses, headers, etc...
- add time in jUnit generated file content
- Add notice / alert level concept for expectations in each rule config
- Add link to CONTRIBUTING.md file which explain how to easily develop new rule
- Find more rules ;)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity68

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~8 days

Recently: every ~22 days

Total

22

Last Release

3179d ago

PHP version history (3 changes)v1.0.0PHP ^5.5||^7.0

v1.0.1PHP ^5.6||^7.0

v1.2.0PHP ^5.6 || ^7.0

### Community

Maintainers

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

---

Top Contributors

[![ReDnAxE](https://avatars.githubusercontent.com/u/990610?v=4)](https://github.com/ReDnAxE "ReDnAxE (57 commits)")

---

Tags

javascriptphpqualitysymfonytesting-toolsphptestingsymfonyframeworkjavascriptqualitygitciinspectorangular

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rednaxe-project-quality-inspector/health.svg)

```
[![Health](https://phpackages.com/badges/rednaxe-project-quality-inspector/health.svg)](https://phpackages.com/packages/rednaxe-project-quality-inspector)
```

###  Alternatives

[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/packages/silverstripe-framework)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6939.5M340](/packages/drupal-core-recommended)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[pestphp/pest-plugin-type-coverage

The Type Coverage plugin for Pest PHP.

343.3M730](/packages/pestphp-pest-plugin-type-coverage)

PHPackages © 2026

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