A tooling release under the hood: Rector's dependency-injection container moves off illuminate/container onto entropy/entropy, and composer-based sets now target the lowest declared version of a library instead of guessing the current one.
New rules 🎉
rector-src
- [Php7.4]
IfToNullCoalescingAssignRector— convert anifnull-guard into??=(#8356) - [Php7.3]
ArrayKeysToArrayKeyFirstLastRector—array_keys($a)[0]→array_key_first($a)(#8238)
rector-symfony
- [Web Link]
WebLinkStringRelationsToConstantsRector(#1058)
Engine 🔧
- Switch the DI container from
illuminate/containertoentropy/entropy(#8362) — lighter container, order-independent service collections viaautodiscover() - [VersionBonding] Allow a rule to require multiple composer package constraints at once (#8355)
- [Composer] Target the lowest declared version for libraries in composer-based sets; only a
projectpackage type is treated as an application (#8359, #8363) - [Configuration] Skip deprecated rules pulled in from an active set — warn only instead of crashing (#8358)
- [DI] Register PHPStan
PhpVersionFactoryas a public service so third-party rules can autowire it (#8365) - [PhpParser] Merge decorating node visitors from 14 to 8 for faster traversal (#8380)
Bugfixes 🐛
rector-src
- [TypeDeclarationDocblocks] Skip
ClassMethodArrayDocblockParamFromLocalCallsRectoron methods overriding a parent/interface (#8357) - [TypeDeclarationDocblocks] Skip a contradicting
@param arraywhen the local call type conflicts with the default value (#8381) - [Naming] Skip a valid singular name with an
oussuffix inRenameForeachValueVariableToMatchExprVariableRector(#8382)
rector-symfony
- [Symfony 6.1] Skip
CommandConfigureToAttributeRectoron non-constantconfigure()values (#1057) - [Symfony 3.4] Skip
ContainerGetNameToTypeInTestsRectorwhen the named service has no matching FQCN service (#1051) - [Symfony 3.0] Skip
OptionNameRectorwhen no option name changes (#1044)
rector-phpunit
- [CodeQuality] Fix
AddInstanceofAssertForNullableArgumentRectorduplicatingassertInstanceOfinside traits (#773) - [CodeQuality] Fix
MatchAssertSameExpectedTypeRectorrewriting a passing assert into a failing one (#771)
Set changes 📈
rector-src
- [CodeQuality] Add
FlipNegatedTernaryInstanceofRectorto the code quality level (#8385)
rector-symfony
- [Symfony 7.3] Add missing rename function call (#1056)
- [Symfony 7.2] Add missing rename class and function calls (#1055)
- [CodeQuality] Move
RequestIsMainRectorand other version-bonded rules to the composer-based set (#1048, #1045) - [Symfony 7.3]
GetFiltersAndFunctionsToAsTwigAttributeRector— support arrow-call functions; gate onsymfony/twig-bridge7.3, not twig alone (#1043, #1050) - [Set] Mark
ANNOTATIONS_TO_ATTRIBUTESas@internalinstead of@deprecated(#1053)
rector-doctrine
- Move
AddAnnotationToRepositoryRectorto the composer-based set only (#510)
Deprecations 💀
Deprecated rules run without any effect, print a warning and will be removed in a future major release.
rector-symfony
- [CodeQuality]
InlineClassRoutePrefixRector(#1049) - [CodeQuality]
AddTraitGetterReturnTypeBasedOnSetterRequiredRector(#1047) - [CodeQuality]
LiteralGetToRequestClassConstantRector(#1046)
Removals 💀
rector-src
- [Cleanup] Remove the write-only
CallLikeThisBoundClosureArgsNodeVisitorand its unread attribute (#8373)