Download Latest Version Released Rector 2.6.3 source code.zip (4.3 MB)
Email in envelope

Get an email when there's a new version of Rector

Home / 2.5.9
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2026-07-30 4.5 kB
Released Rector 2.5.9 source code.tar.gz 2026-07-30 2.1 MB
Released Rector 2.5.9 source code.zip 2026-07-30 4.6 MB
Totals: 3 Items   6.6 MB 0

Bugfixes :bug:

  • [DeadCode] Remove unreachable class-like checks in Class_-only rules (#8217)
  • [CodingStyle] Use native php-parser node API over class reflection (#8218)
  • [Php80] Remove AstResolver usage on AddParamBasedOnParentClassMethodRector (#8196)
  • Wire RichParser node visitors via DI factory instead of private property hack (#8215)
  • [Php80] Skip promoting a property the parent declares without a native type in ClassPropertyAssignToConstructorPromotionRector (#8232)
  • [DeadCode] Keep empty __construct() in anonymous class that extends parent on RemoveEmptyClassMethodRector (#8219)
  • [DeadCode] Skip negative zero on RemoveDeadZeroAndOneOperationRector (#8213)
  • [DeadCode] Skip protected property on non-final class on RemoveDefaultValueFromAssignedPropertyRector (#8214)
  • [DeadCode] Skip array dim fetch assign on RemoveDefaultValueFromAssignedPropertyRector (#8212)
  • [DeadCode] Skip if/else in loop on RemoveDefaultValueFromAssignedPropertyRector (#8211)
  • [DeadCode] Skip early return in constructor on RemoveDefaultValueFromAssignedPropertyRector (#8209)


Set changes :wastebasket:

NullToStrictStringFuncCallArgRector out of the PHP 8.1 set (#8234)

The rule and all its fixtures stay, so it can still be opted into:

:::php
->withRules([NullToStrictStringFuncCallArgRector::class])


Deprecations :skull:

TypeDeclarationDocblocks: 3 data provider docblock rules (#8235)

Data provider docblock typing is not relevant to code quality — it increases maintenance cost and decreases readability of the test class.

Deprecated rules:

  • AddReturnArrayDocblockFromDataProviderParamRector
  • AddReturnDocblockDataProviderRector
  • AddParamArrayDocblockFromDataProviderRector


rectorphp/rector-symfony :musical_note:

  • [Symfony72] Match push() to its own RequestStack variable in PushRequestToRequestStackConstructorRector (#971)
  • [Symfony44] Skip custom isGranted() service calls in controllers in AuthorizationCheckerIsGrantedExtractorRector (#973)
  • [Symfony42] Update Cookie fixture after NewToStaticCallRector config removal (#974)
  • Drop rector/type-perfect, its rules ship in tomasvotruba/type-coverage 2.3 now (#972)
  • Bump dev dependencies, PHPUnit 13 (#976)
  • [deps] Bump symfony/config to ^8.1 (#977)

Deprecated: SimplifyFormRenderingRector (#975)

The rule removed the explicit ->createView() call when a form was passed to render():

Symfony supports passing the FormInterface directly, but the shorthand is ambiguous and breaks dynamic forms: forms modified in PRE_SET_DATA/POST_SUBMIT listeners and submitted over AJAX end up with a 422 response and no clear error. Keeping the explicit ->createView() call is the reliable form. See [symfony/symfony#50542](https://github.com/symfony/symfony/issues/50542).


rectorphp/rector-phpunit :test_tube:

  • [PHPUnit 13] Fix class in expectExceptionMessage() rename to TestCase (#735)


rectorphp/rector-downgrade-php :arrow_down:

  • [DowngradePhp81] Reference MHASH_* constants by name in DowngradeHashAlgorithmXxHashRector to fix PHP 8.5 deprecation (#386)
Source: README.md, updated 2026-07-30