rector / rector-compat-tests
Tests for compatibility with PHPStand and PHPUnit preload magic
dev-main
2026-05-26 16:02 UTC
Requires (Dev)
- php: ^8.2
- driftingly/rector-laravel: ^2.4
- nikic/php-parser: 5.4.*|5.5.*|5.6.*|5.7.*
- phpstan/phpstan: 2.1.*
- phpunit/phpunit: 10.*|11.*|12.*
- rector/jack: ^1.0
- rector/rector: dev-main as 2.4.4
This package is auto-updated.
Last update: 2026-05-26 16:02:17 UTC
README
A small test harness that verifies Rector keeps working alongside other tools in the PHP static-analysis ecosystem.
It runs a minimal real-world setup — a custom Rector rule, a custom PHPStan rule, and a PHPUnit test suite — against multiple combinations of dependencies in CI, to catch breakage early.
What it checks
- A custom Rector rule (
MakeClassFinalRector,UseGetArgRector) loads and applies correctly. - A custom PHPStan rule (
CustomPHPStanRule) loads and runs alongside Rector. - PHPUnit 10, 11, and 12 all work with Rector's preloaded dependencies.
- Manually including
nikic/php-parserin user code does not conflict with the copy Rector ships. rector-laravel+nikic/php-parserupgrade scenarios run cleanly (see rectorphp/rector#9470).
How it runs
GitHub Actions runs the matrix daily (0 6 * * *) and on every push/PR:
compat_tests.yaml— Rector dev + PHPUnit 10 / 11 / 12rector_laravel_php_parser.yaml— Rector + rector-laravel + php-parser