rector/rector-compat-tests

Tests for compatibility with PHPStand and PHPUnit preload magic

Maintainers

Package info

github.com/rectorphp/rector-compat-tests

pkg:composer/rector/rector-compat-tests

Statistics

Installs: 2 254

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-main 2026-05-26 16:02 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-parser in user code does not conflict with the copy Rector ships.
  • rector-laravel + nikic/php-parser upgrade 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 / 12
  • rector_laravel_php_parser.yaml — Rector + rector-laravel + php-parser