rector / monitor
Monitor code quality for all your projects/packages in one place. Keep same PHP version, packages and even PHPStan extensions. Helps with merging multiple repositories to one.
Fund package maintenance!
tomasvotruba
www.paypal.me/rectorphp
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 4
pkg:composer/rector/monitor
Requires
- php: >=8.3
- composer/semver: ^3.4
- entropy/entropy: dev-main
- nette/neon: ^3.4
- nette/utils: ^4.1
- symfony/console: ^6.4
- symfony/filesystem: ^7.4
- symfony/finder: ^7.4
- symfony/process: ^7.4
- webmozart/assert: ^1.12
Requires (Dev)
- phpecs/phpecs: ^2.2
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^2.1
- phpstan/phpstan-deprecation-rules: ^2.0
- phpunit/phpunit: ^11.5
- rector/jack: ^0.4.0
- rector/rector: ^2.2
- shipmonk/composer-dependency-analyser: ^1.8
- symplify/phpstan-extensions: ^12.0
- symplify/phpstan-rules: ^14.9
- tomasvotruba/class-leak: ^2.1
- tomasvotruba/unused-public: ^2.1
- tracy/tracy: ^2.11
This package is auto-updated.
Last update: 2026-01-06 22:46:07 UTC
README
Monitor code quality for all your projects and packages in one place, ensuring consistency and eliminating conflicts across PHP versions.
"Got 99 packages, but same version share none" - unknown
Have a single place to monitor your projects and packages code quality from no more conflicts between packages, no more one project in PHP 8.1 and other in PHP 7.2.
Install
composer require rector/monitor --dev
1. Single place to Quality control Multiple repositories
vendor/bin/monitor analyze
This command will load monitor.php configuration file from project root. There you define repositories and requirements to meet:
use Rector\Monitor\Config\MonitorConfig; return MonitorConfig::configure() ->addRepositories([ 'https://github.com/rectorphp/rector-symfony', 'https://github.com/rectorphp/rector-doctrine', 'https://github.com/rectorphp/rector-phpunit', 'https://github.com/rectorphp/rector-downgrade-php', ]) ->addRepositoryBranch('https://github.com/rectorphp/rector-src', 'main') // ->addRepositoryBranch('...', 'stage') // composer rules // ->disallowPackages(['symfony/phpunit-bridge']) ->requirePackages([ 'rector/rector', 'phpecs/phpecs', 'phpstan/phpstan', 'phpstan/extension-installer', 'symplify/phpstan-rules', ]) // version requirements ->minPackageVersion('phpstan/phpstan', '2.1') ->minPackageVersion('rector/rector', '2.2') // other rules ->noPhpstanBaseline();
The repositories are cloned locally and cached to get fast performance. To refresh them:
vendor/bin/monitor analyze --clear-cache
2. See full Matrix of Repositories' Dependencies
This command shows dependency table for each defined repository. It will show which package versions are used in which repositories. This way you can easily spot conflicts between your packages and projects.
vendor/bin/monitor matrix
↓
3. See Difference between Two Projects
- Do you want to merge 2 projects into one monorepo?
- Are you curious how much are 2 project different to each other?
Compare them to eliminate their differences first, then make their merge smooth and easy:
vendor/bin/monitor compare <monorepo-project> --merge-project <project-to-be-merged> # e.g. vendor/bin/monitor compare ../monorepo-project --merge-project ../project-to-be-merged
This command will check:
- differences in dependencies
- differences in autoload
- if Symfony, difference between config files
- PHPStan analyzed paths
- PHPStan extensions
- PHPStan level
Happy coding!
