github rectorphp/rector 0.17.6
Released Rector 0.17.6

latest releases: 1.2.5, 1.2.4, 1.2.3...
14 months ago

In this release, we narrowed rules from PHPUit and Doctrine to their specific version category. We've detected few outdated and never used rules and cleaned them up to make Rector smaller and easier to use 👍

Be use to always use *SetList constants over specific rules to use the latest version:

use Rector\Config\RectorConfig;

return static function (RectorConfig $rectorConfig): void {
    $rectorConfig->sets([
        \Rector\PHPUnit\Set\PHPUnitLevelSetList::UP_TO_PHPUNIT_100,
    ]);
};

New Features 🥳

  • Add PHPUnit to sets (#4495)
  • [CI] Add PHPUnit 10 to check rules and sets groups (#4500)
  • [CI] Add doctrine rules in set check (#4505)

Bugfixes 🐛

  • [Performance] Only set Attribute on context inside ArrayDimFetch and ArrayItem on specific node used (#4493)
  • [Php52] Use instanceof check instead of compare object $newStmt === $caseStmt on ContinueToBreakInSwitchRector (#4494)
  • Exclude the full docs folder from archives (#4497), Thanks @stof!
  • Cleanup RecastingRemovalRector tests (#4498)
  • Move Rector order test to PHPUnit, as uses its rules (#4499)
  • let phpunit handle its own empty method rule (#4501), Thanks @staabm!
  • Micro optimizations: cheap checks first (#4510), Thanks @staabm!
  • Skip coalsce assign in RemoveUnusedPrivatePropertyRector (#4491)
  • [DeadCode] Skip append += assignment on RemoveUnusedPrivatePropertyRector (#4506)
  • [AstResolver][Performance] Remove unnecessary double File read on AstResolver::parseFileNameToDecoratedNodes() (#4508)

Removed 💀

  • [NodeTypeResolver] Remove unused AttributeKey::INSIDE_ARRAY_ITEM on ContextNodeVisitor (#4496)
  • [NodeTypeResolver] Remove AttributeKey::IS_RETURN_EXPR from ContextNodeVisitor (#4502)
  • [NodeTypeResolver] Remove AttributeKey::IS_ISSET_VAR from ContextNodeVisitor (#4503)
  • [NodeTypeResolver] Remove nestedChainMethodCallLimit() for deep method call counter check (#4504)

Don't miss a new rector release

NewReleases is sending notifications on new releases.