ixnode / php-quality-suite
PHP Quality Suite - A zero-config PHP quality toolbox combining Rector, PHPStan, and PHPMD. Run static analysis and automated refactorings with simple commands.
Requires
- php: ^8.0
- ext-yaml: *
- adhocore/cli: ^v1.0.0
- rector/rector: ^2.1
README
🚀 Zero-config. Out-of-the-box. Instant code quality.
The PHP Quality Suite combines Rector, PHPStan, and PHPMD into a single developer-friendly toolbox.
Run static analysis and automated refactorings with simple CLI commands – no configuration required. Just:
vendor/bin/php-quality-suite rector --level=0 --dry-run
✔️ No setup needed – works immediately after installation
✔️ Instant upgrades – migrate between PHP or Symfony versions
✔️ Quality built-in – type safety, dead code removal, coding standards
1. Installation
composer require --dev ixnode/php-quality-suite
vendor/bin/php-quality-suite -V
php-quality-suite 0.1.0 (2025-09-20 19:59:14) - Björn Hempel <bjoern@hempel.li>
2. Quick start
Make sure your composer.json
defines the target PHP version for analysis, e.g.:
{ "require": { "php": "^8.0" } }
Analyze your codebase right away:
vendor/bin/php-quality-suite rector --include=src --level=0 --dry-run
✅ Runs instantly
✅ No setup required
✅ Safe first checks without modifying files
Remove --dry-run
once you’re ready to apply the fixes automatically.
Hint: By default, this example uses the src directory. For customizing paths or excluding directories, see the following chapter Preparation.
3. Preparation
PHP Version
The static analysis tools determine the target PHP version from your project's composer.json
.
Make sure your composer.json
contains the desired PHP version in the require.php
field,
for example:
{ "require": { "php": "^8.0" } }
This setting defines the PHP version Rector and PHPStan will use for parsing and refactoring. Adjust this value according to the PHP version you want to migrate to or validate against.
Paths
The PHP Quality Suite needs to know which paths to analyze and which ones to ignore.
A template configuration file is included in this package:
cp vendor/ixnode/php-quality-suite/config/pqs.yml.dist pqs.yml
Now adjust the file pqs.yml
to match your project structure.
Example pqs.yml
paths-included: src: src tests: tests vendor_gui: lib/VendorGuiBundle paths-excluded: - src/Legacy - src/Experimental
paths-included
: Directories or files to be analyzed. You can assign keys (e.g.vendor_gui
) to reference them in CLI commands.paths-excluded
: Directories or files that are always excluded from analysis. These paths are passed to Rector automatically.
Notes
- All paths are relative to the project root.
- You can include both directories and single files.
- If
pqs.yml
is missing, the default configurationpqs.yml.dist
from the package will be used.
Usage with --include
By default, all paths listed under paths are analyzed. You can restrict the analysis to specific entries using the
--include
option: --include=src,vendor_gui
. This will analyze only the src
and vendor_gui
directories, while
the excluded paths from pqs.yml
are always respected.
4. Best Practices
See:
5. License
This tool is licensed under the MIT License - see the LICENSE file for details.