Releases: rectorphp/rector
Releases · rectorphp/rector
Released Rector 0.15.23
Released Rector 0.15.22
New Features 🥳
- Implement
AddConstructorParentCallRector
(#3430), Thanks @jackbentley! - [CodeQuality] Add indirect return scalar on ReturnTypeFromStrictScalarReturnExprRector (#3478)
- [Container] Add RectorConfig::containerCacheDirectory() (#3490)
- [TypeDeclaration] Handle return from array_map() on ReturnTypeFromStrictTypedCallRector (#3471)
Bugfixes 🐛
- [AutoImport][PostRector] Handle duplicated import on namespaced class on UseAddingPostRector (#3461)
- [Php80] Narrow bool|false to bool on UnionTypesRector (#3468)
- [TypeDeclaration] Skip on ArrayDimFetch on EmptyOnNullableObjectToInstanceOfRector (#3473)
- [PostRector] Allow unused alias removal from Use_ on UnusedImportRemovingPostRector (#3477)
- [CodingStyle] Skip var ArrayDimFetch on SplitDoubleAssignRector (#3481)
- [TypeDeclaration] Skip mixed condition string on TypedPropertyFromStrictConstructorRector (#3482)
- [Caching] Alternative Fix caching on change config cache not cleared (#3483)
- [DowngradePhp73][DowngradePhp74] Fix infinite loop on DowngradeNullCoalescingOperatorRector+DowngradePhp73JsonConstRector (#3484)
- [TypeDeclaration] Handle infinite loop on type recursive itself on ReturnTypeFromStrictTypedCallRector (#3487)
- [Printer] Handle commented code before closing tag on no rule applied print on PhpFileProcessor (#3488)
- [Config] Increase default nested chain method call limit to 120 (#3491)
- Performance: Memoize sipped file paths (#3495), Thanks @keulinho!
- [CodeQuality] Skip with ascii on JoinStringConcatRector (#3497)
- Reuse AstResolver memoizing on ClassLikeAstResolver (#3498)
Released Rector 0.15.20
New Features 🥳
- [DX] Add "setup-ci" command to ease integration to CI (#3425)
- [CI] Move from EndBug/add-and-commit to stefanzweifel/git-auto-commit-action (#3426)
- [CodeQuality] Add concat support on ReturnTypeFromStrictScalarReturnExprRector to be string (#3435)
- [Php80] Add typed property Closure support on ClassPropertyAssignToConstructorPromotionRector (#3453)
Bugfixes 🐛
- [Privatization] Fix crash on assign inside Arg on ChangeReadOnlyVariableWithDefaultValueToConstantRector (#3423)
- [TypeDeclaration] Only apply false type on php 8.2+ configured on TypedPropertyFromAssignsRector (#3422)
- [Php71] Set public constant on final constant on PublicConstantVisibilityRector (#3431)
- [CodingStyle] Fix infinite loop on NewlineAfterStatementRector when parent attribute is different (#3434)
- [Php80] Skip array append different keys in cases on ChangeSwitchToMatchRector (#3437)
- Alternative Rector workflow on check repo before steps run (#3440)
- Handle $reflectionProperty->getDefaultValueExpression() return null (#3446)
- [CodingStyle] Skip case not constant value on BinarySwitchToIfElseRector (#3452)
- [CodingStyle] Use ExprAnalyzer::isDynamicExpr() to detect dynamic value case cond on BinarySwitchToIfElseRector (#3456)
- [DeadCode] Skip assign inside if cond on RemoveAlwaysTrueIfConditionRector (#3447)
Removed 💀
Released Rector 0.15.19
Bugfixes 🐛
- Skip not natively typed property in AddParamTypeFromPropertyTypeRector (#3421), Thanks @rene-bos!
- [DeadCode] Skip if cond use variable from @param doc on RemoveAlwaysTrueIfConditionRector (#3402)
- [phpstan-extensions] Provide phpstan container to bootstrap file from extensions (#3401)
- Allow class vs function names on imports (#3404)
- Fixing random stop rules-tests with paratest (#3415)
- rename fixture (#3416)
- [CodeQuality] Handle deep comments merged on ShortenElseIfRector (#3419)
- Skip nullable DateTimeInterface in RenamePropertyToMatchTypeRector (#3420)
Released Rector 0.15.18
New Features 🥳
- Bump to PHPStan 1.10
- [Transform] Add
MethodCallToFuncCallRector
(#3391) - [Php56] Skip after infinite loop on AddDefaultValueForUndefinedVariableRector (#3390)
- [Php56][Php70] Handle infinite loop on AddDefaultValueForUndefinedVariableRector+IfToSpaceshipRector (#3394)
Bugfixes 🐛
- Revert recursive check on always array param on phpstan 1.10 on AddMethodCallBasedStrictParamTypeRector (#3399)
- Reuse anonymous class detection via ClassAnalyzer on PHPStanNodeScopeResolver (#3393)
- [e2e] [printer] Fix short open tag mixed php+html cause surplus <?php (#3395)
- Fix BleedingEdgeIncludePurifier to use random value on temporary file to avoid crash (#3396)
- Fix: print non PHP file processors changes in parallel runs (#3384), Thanks @ian-zunderdorp!
Released Rector 0.15.17
Bugfixes 🐛
- Fix external packages bleeding edge includes (#3389)
- [CodeQuality][Printer] Handle mix php+html on TernaryFalseExpressionToIfRector (#3382)
- [Printer] Ensure disable flag isRequireReprintInlineHTML on change file on MixPhpHtmlDecorator (#3383)
- [Php81] Handle null defined in variable first on NullToStrictStringFuncCallArgRector (#3385)
- [Printer][EarlyReturn] Enable InlineHTML on RemoveAlwaysElseRector (#3387)
Released Rector 0.15.15
New Features 🥳
- [DX] Add back node helper functions to ease debugging (#3354)
- Added RenameClassNonPhpRector dependency to ClassRenamingPostRector (#3360), Thanks @grandmaster44!
- Add unused import remover to cleanup use imports after changes (#3358)
- [config] include bootstrap files of extensions, to let rector know about types as well (#3380)
Bugfixes 🐛
- Fix CallableTypeParameterNode and IdentifierTypeParameterNode crash (#3353)
- [Cache] Replace Strings::webalize() with sha1_file() from resolved path on ChangedFilesDetector (#3356)
- The php-parser 5.0 is far away from release, no need to include it for now (#3355)
- [TypeDeclaration] Handle crash Multiple variants - use selectFromArgs() on ReturnAnnotationIncorrectNullableRector (#3359)
- Replace ParametersAcceptorSelector::selectSingle() with ParametersAcceptorSelectorVariantsWrapper::select() when possible (#3361)
- [Php55] Handle crash on direct $ without double quote backreference on PregReplaceEModifierRector (#3369)
- [Renaming] Skip rename as Namespace_ name on RenameClassRector (#3371)
- [Php72] Handle crash on variable as operator on CreateFunctionToAnonymousFunctionRector (#3370)
- [TypeDeclaration] Handle nullable intersection on TypedPropertyFromAssignsRector (#3372)
- [Php80][AutoImport] Do not import iterable on AutoImport enabled on UnionTypesRector (#3374)
- Fix test on RenameClassRector (#3381)
- Skip namespaced use on removeUnusedImports() feature (#3365)
Removed 💀
Released Rector 0.15.13
New Features 🥳
- [Symfony] Add ServiceSettersToSettersAutodiscoveryRector (#343)
- [PHPUnit] Add RemoveTestSuffixFromAbstractTestClassesRector (#151)
Bugfixes 🐛
- [PHPUnit] Fix Group function annotation to attribute to class (#150)
- [CodeQuality] Mirror comment on ShortenElseIfRector (#3334)
- [StaticReflection] Fix unintended behavior in PHP 8.1 and later (#3340), Thanks @zeriyoshi!
- [Testing] Make temp fixture file names exposed next to the fixture file, to make easier fixes and path resolvements (#3338)
- [CodeQuality] Skip has AllowDynamicProperties attribute on CompleteDynamicPropertiesRector (#3346)
- Don't get type from PropertyFetch for not natively typed properties (#3327), Thanks @rene-bos!
Removed 💀
Released Rector 0.15.12
This relese groups changes since 0.15.9 till 0.15.12 as hotfix releases.
New Features 🥳
- [PHPUnit 10] Add data provider annotaiton to attribute rule (#146)
- [TypeDeclaration] Add PropertyTypeFromStrictSetterGetterRector (#3313)
- [TypeDeclaration] Add ReturnTypeFromStrictTernaryRector (#3318)
- [Printer] Handle Add Node after Nop statement inlineHTML (#3303)
- [NodeDecorator] Improve MixPhpHtmlDecorator::decorateNextNodesInlineHTML() performance: stop loop on found InlineHTML (#3305)
- [Printer] Handle add Node after Nop not first stmt (#3312)
- Make "init" part of "process" command to help new users with creating config (#3326)
- Upgrade to PHPUnit 10 🥳️ (#3332)
Bugfixes 🐛
- Fix nested extends pattern in AddReturnTypeDeclarationBasedOnParentClassMethodRector (#3325), Thanks @zeriyoshi!
- [Php82] Skip non-FilesystemIterator on FilesystemIteratorSkipDotsRector (#3298)
- [Php72] Handle crash on CreateFunctionToAnonymousFunctionRector on quoted variable arg concat (#3300)* trigger build (#3301)
- [Printer] Handle return array of nodes with InlineHTML (#3304)
- [Printer] Clean up nl usage on surplus tag check (#3307)
- [PHPStanStaticTypeMapper] Handle crash on OversizedArrayType (#3306)
- [Printer] Use <= 0 check for getStartTokenPos() for current node availability on MixPhpHtmlDecorator (#3308)
- [CodeQuality] Skip reassign key on SimplifyForeachToCoalescingRector (#3315)
- [Php81] Skip ReadonlyProperty for class that consume Trait with Property (#3314)
- [Php82] Move consume trait property skip check to ReadOnlyClassRector (#3316)
- [Php70] Handle crash on IfToSpaceshipRector with enum case (#3317)
- [TypeDeclaration] Skip used by trait on PropertyTypeFromStrictSetterGetterRector (#3319)
- [TypeDeclaration] Consume ParentClassMethodTypeOverrideGuard from ClassMethodReturnTypeOverrideGuard::shouldSkipClassMethod() (#3320)
- [TypeDeclaration] Replace ParentClassMethodTypeOverrideGuard::isReturnTypeChangeAllowed() with ClassMethodReturnTypeOverrideGuard::shouldSkipClassMethod() in ReturnNeverTypeRector (#3321)
- [TypeDeclaration] Move method ParentClassMethodTypeOverrideGuard::isReturnTypeChangeAllowed to ClassMethodReturnTypeOverrideGuard and make it private (#3323)
Released Rector 0.15.8
New Features 🥳
- [Printer] Apply add node before node before HTML take 3 (#3287)
- Move Reprint previous node of first node early to NodeAddingPostRector, mix html+php take 4 (#3290)
- Add constant FilesystemIterator::SKIP_DOTS when flags parameter is used (#3215), Thanks @jawira!
- Show different code on found errors, and on fatal errors (#3297)
Bugfixes 🐛
- [CodeQuality] Handle mix HTML+PHP on ForRepeatedCountToOwnVariableRector (#3282)
- Clean up mix HTML+PHP first stmt check (#3285)
- Clean up Mix HTML+PHP take 2 (#3286)
- [AutoImport] Skip first stmt is InlineHTML (#3288)
- [Printer] Skip Tweak html+php handling on File is no diff (#3289)
- [Php80] Handle crash leaveNode() returned invalid value of type integer on TokenGetAllToObjectRector (#3291)
- [Php73] Skip prev() call on items after key called on ArrayKeyFirstLastRector (#3293)
- Bump php-parser 4.15.3 and re-generate preload file (#3294)
- [Renaming][PostRector] Handle skip path after defined at RenameClassRector (#3243)
Removed 💀
- remove unused CoalesceAnalyzer (rectorphp/rector-src@7ab50dc)
- remove downgrade only method (rectorphp/rector-src@8bf0045)
- remove unused DoctrineAnnotationFactory (rectorphp/rector-src@3d7de8a)
- remove unused ClassFromEnumFactory (rectorphp/rector-src@f6463a5)
- remove NamedVariableFactory (rectorphp/rector-src@3f0dc2a)
- remove unused namespace name decorator (rectorphp/rector-src@71aacbe)
- remove removeAbstract() unused method (rectorphp/rector-src@daf7d2b)
- remove MethodTypeAnalyzer (rectorphp/rector-src@505a249)