PHP 8.6 set additions and faster runs 🚀
This release grows the PHP 8.6 set with deprecated function alias renames, moves ConsistentImplodeRector down to the php74 set, and ships another round of performance work across the runner, printer, and reflection refresh.
New Features ⭐
- Add PHP 8.6 deprecated function alias renames to php86 set (#8905)
- Remove deprecated third arg of
define()in php86 set (#8906) - Move
ConsistentImplodeRectorfrom php80 to php74 (#8894) Thanks @zoliszabo
Bugfixes 🐛
- Run post rectors after the rules reach a fixed point, so no rule sees an imported short name (#8909) Thanks @SanderMuller
AnnotationToAttributeRector: fold unknown named args into the attribute's$options(#8914) Thanks @kix- [Php74] Fix
MbStrrposEncodingArgumentPositionRectortreating mixed$offsetas encoding (#8913) - [DeadCode] Skip nested conditional assign in
RemoveDefaultValueFromAssignedPropertyRector(#8915) - [DeadCode] Skip with HTML on
RemoveAlwaysTrueIfConditionRector(#8896) - [Printer] Keep blank lines between statements when a node list is emptied (#8886)
Performance Improvements 🚀
- Reduce double traversal on promoted property lookup in
AstResolver(#8903) - Reuse
File::containsHTML()onAddUseStatementGuardto cut a double traverse (#8899) - Reuse collected use statements when resolving PHPDoc short names (#8901)
- Skip current file lookup when a rule makes no change in
RectorRunner::run()(#8891) - Optimize class reflection refresh with cheaper cache hashing and early class-name validation (#8892)
- Skip
wrapBinaryOpWithBrackets()forCallLikenodes inBetterStandardPrinter::p()(#8890)
Internals ⚙️
- Convert Doctrine annotations from phpdoc-parser nodes, remove
StaticDoctrineAnnotationParser(#8881) Thanks @ondrejmirtes - Use PHPStan
Type::toNativePhpTypeNode()andType::toPhpDocNode()instead of own type mappers (#8885) Thanks @ondrejmirtes - Remove phpdoc-parser workarounds fixed in phpdoc-parser 2.3.10 and 2.3.11 (#8898) Thanks @ondrejmirtes
- Bump minimal phpstan and phpdoc-parser to latest patch versions (#8916)
- Make use of PHPStan
InClassNodeonPHPStanNodeScopeResolver(#8902) - [Core] Remove unneeded
origNodeattribute get onRectorRunner(#8893) - [Printer] Remove
BetterStandardPrinter::pExpr_Ternary()method (#8887) - [Printer] Remove
@propertyfor$insertionMaponBetterStandardPrinter(#8888)