Verified 2026-10-26
Permanent entry
Rector 2.8: faster runs, single-pass rules and deprecated niche rules
Rector 2.8.0 was released on 26 October 2026 at 12:16 UTC, followed by 2.8.1 at 13:06 UTC.
Changes described in the 2.8.0 notes
- Performance. The notes report the core engine about 26% faster (1.36×) with about 8% less memory than 2.7.0:
32.0 s / 351 MB with 2.7.0, 23.6 s / 324 MB with 2.8.0, and about 10.0 s / 317 MB with 2.8.0 plus PHPStan Turbo on
PHP 8.3+. The Turbo factor (about 2.4× wall time) was measured on Rector's own
rules/directory on a 24-core host with PHP 8.4; the notes say the gain scales with core count. These are the project's own benchmarks and were not reproduced here. The work hoists cheap node checks ahead of reflection, scope and type lookups, uses keyed lookups in configurable rules and resolves names and unused imports in one AST walk. - PHPStan Turbo in workers. On PHP 8.3+ the parallel workers run with PHPStan Turbo, the native parsing extension
shipped with
phpstan/phpstan, without restarting the main process (#8812). See the PHPStan 2.3 page for Turbo itself. - Single-pass rules. Instead of a per-node re-processing guard, the engine iterates rules to a fixed point with a content-cycle guard, and tests enforce that a rule produces the same result whether it runs once or many times.
- Deprecated rules. Many niche, rarely used rules that belong to no set are deprecated. They still run and print a
warning and will be removed in a future major release. The "Deprecations" section names them, for example
FuncCallToNewRector,FuncCallToStaticCallRector,MethodCallToStaticCallRector,NewToStaticCallRector,MergeInterfacesRectorandStringToClassConstantRector(Transform/Arguments). - Removed API. The same section lists removing dead and deprecated public API, including
@apiannotations, unused collectors and interfaces,RectifiedAnalyzer, the deprecatedwithPhp53Sets()…withPhp74Sets()configuration methods and cache-meta methods (#8794 and related PRs). Configurations that still call those methods may fail after upgrading; their replacements are not named in the notes and were not checked. - Additions.
ExplicitNullableObjectInstanceRector(CodeQuality) replaces four nullable-objectinstanceofrules (#8636);list-rulesis undeprecated (#8533) and gains--allto list rules in core andrector-*packages (#8637); the parallel worker count respects cgroup/CFS CPU quotas (#8559). The notes also list "Bump to PHPStan 2.3", although the 2.7.0 notes carry the same line; the exact constraint change was not checked.
2.8.1
2.8.1 has one listed fix: a cache crash caused by PHPStan Turbo (#8850). The notes do not describe the conditions that triggered the crash.
Limitations
This page relies on the release notes, not on the code. The deprecated-rule list above is a selection; the full list is in the release notes.
Related: PHPStan 2.3.0; Rector 2.7 coverage in the 6 October digest.