Skip to content

Released Rector 2.6.6

Latest

Choose a tag to compare

@TomasVotruba TomasVotruba released this 02 Sep 09:39
· 1 commit to main since this release

File selection

--filter option to narrow processed files (#8419)

New --filter option keeps only files whose path matches all given patterns. Repeat the option to require several patterns at once, handy for scoping a run to a subtree or a naming convention without editing config paths.

vendor/bin/rector process src --filter Controller --filter Admin

Before: process every file under the given paths. After: process only files matching all --filter patterns.

Bugfixes 🐛

  • Add back RectorConfig::tag() as a no-op BC layer (#8431)
  • TypeDeclarationDocblocks: fix invalid array-in-key docblock when narrowing long array unions (#8430)
  • BetterPhpDocParser: keep import used only in an annotation array key (#8429)
  • RenameVariableToMatchMethodCallReturnTypeRector: fix partial rename with same-named nested arrow param (#8428)
  • ArrayFirstLastRector: skip nested compound assignment (#8425)
  • ReturnTypeFromStrictNewArrayRector: add doc return type only for list and generic arrays (#8423), skip noisy array-shape union return docblock (#8422)

Extension packages

rector-phpunit 🟢

  • AllowMockObjectsForDataProviderRector: skip dynamic method call (#781)
  • AssertEmptyNullableObjectToAssertInstanceofRector: skip assertNull/assertEmpty (#780)
  • AddSeeTestAnnotationRector: skip existing imported or short @see annotation (#779)

rector-downgrade-php ⬇️

  • DowngradeSetAccessibleReflectionPropertyRector: handle getProperties()/getMethods() loop (#396)
  • DowngradeHashAlgorithmXxHashRector: skip PHP_VERSION_ID guarded hash() calls (#394)

Internal / cleanup

  • Add mspirkov/yii2-rector link to README (#8427)
  • Add fixtures for arrow functions returning a ?? expression (#8421)