Releases
2.1.3
New Features 🥳
Add ClosureFromCallableToFirstClassCallableRector
rule (#7071 ), Thanks @devnix !
[Php81] added RemoveReflectionSetAccessibleCallsRector
(#7085 ), Thanks @NickSdot !
[type-declaration] Add AddReturnTypeFromTryCatchTypeRector (#7099 )
Add check phpstan if phpstan is running on preload.php (#7040 )
[type-coverage] Add support for same returned object in ReturnTypeFromReturnNewRector (#7096 )
feat: add support for set, isset, and unset operations in ArrayDimFetchToMethodCallRector (#7095 ), Thanks @calebdw !
[TypeDeclaration] Skip try catch finally different type on AddReturnTypeFromTryCatchTypeRector (#7101 )
[type-declaration] Add AddArrayFilterClosureParamTypeRector (#7111 )
[type-coverage] Improve AddArrowFunctionParamArrayWhereDimFetchRector to handle multiple functions (#7112 )
add list<...> support to AddArrayFunctionClosureParamTypeRector (#7116 )
feat: add RemoveReadonlyPropertyVisibilityOnReadonlyClassRector
(#7115 ), Thanks @calebdw !
feat: add laravel to RectorConfigBuilder::withComposerBased (#7110 ), Thanks @calebdw !
[Renaming] Add RenameCastRector
(#7117 ), Thanks @mttsch !
[type-declarations] Add TypedPropertyFromDocblockSetUpDefinedRector (#7135 )
PHP 8.5 🚀
[Php85] Add missing url about openssl_pkey_derive arg deprecation (#7141 ), Thanks @mttsch !
[Php85] Remove deprecated arg from openssl_pkey_derive calls (#7127 ), Thanks @mttsch !
[Php85] Remove arg from get_defined_functions calls (#7126 ), Thanks @mttsch !
[Php85] Remove context arg from finfo_buffer calls (#7129 ), Thanks @mttsch !
[Php85] Rename socket_set_timeout function calls (#7121 ), Thanks @mttsch !
[Php85] Rename mysqli_execute function calls (#7122 ), Thanks @mttsch !
[Php85] Rename deprecated SplObjectStorage methods (#7123 ), Thanks @mttsch !
[Php85] Rename deprecated PDO constants and methods (#7125 ), Thanks @mttsch !
[Php85] Replace null return with empty array in __debugInfo (#7124 ), Thanks @mttsch !
Bugfixes 🐛
[TypeDeclaration] Handle crash on direct callable without params on AddArrayFunctionClosureParamTypeRector (#7131 )
[TypeDeclaration] Skip ArrayAccess as array item type on AddArrowFunctionParamArrayWhereDimFetchRector (#7113 )
[Renaming] Allow rename attribute on Param on RenameAttributeRector (#7072 )
[CodeQuality] Mirror comment on InlineConstructorDefaultToPropertyRector (#7074 )
[CodeQuality] Move logic directly for merge comments on InlineConstructorDefaultToPropertyRector (#7075 )
[CodingStyle] Fix variable in the middle on WrapEncapsedVariableInCurlyBracesRector (#7076 )
[CodeQuality] Skip Never type by @return docblock on ExplicitReturnNullRector (#7078 )
[Naming] Skip var used after switch on RenameForeachValueVariableToMatchExprVariableRector (#7080 )
[Naming] Use ScopeFetcher::fetch() near its usage on RenameForeachValueVariableToMatchExprVariableRector (#7081 )
[AutoImport] Handle auto import short name on global namespace (#7086 )
[TypeDeclaration] Skip ArrayAccess on StrictArrayParamDimFetchRector (#7087 )
[Php81] Handle on ternary on NullToStrictStringFuncCallArgRector (#7091 )
fix: sorting of named parameters in variadic functions (#7090 ), Thanks @calebdw !
fix: skip AssignOps in ArrayDimFetchToMethodCallRector (#7100 ), Thanks @calebdw !
Skip PhpdocTypesFixer of PhpCsFixer on Scalar node (#7103 )
fix: skip variable assignments in get_defined_vars (#7106 ), Thanks @calebdw !
[Php80] Skip not match property hook type with parameter type on ClassPropertyAssignToConstructorPromotionRector (#7109 )
[DeadCode] Early check GenericTypeNode is not dead code on DeadVar/ReturnParam Analyzer (#7118 )
[Config] Allow php85: true on withPhpSets() (#7130 )
[Php84] Allow on return on ForeachToArrayAnyRector (#7119 ), Thanks @Orest-Divintari !
[TypeDeclaration] Keep Generic type docblock on TypedPropertyFromDocblockSetUpDefinedRector (#7140 )
fix: allow more nodes to be passed to AttributeGroupNewLiner (#7145 ), Thanks @calebdw !
[DeadCode] Skip used in compact() on RemoveUnusedForeachKeyRector (#7073 )
[DeadCode] Handle assign on Arg on RemoveUnusedPrivatePropertyRector (#7092 )
[DeadCode] Skip Templated type on param and return on RemoveUselessParamTagRector and RemoveUselessReturnTagRector under IntersectionType (#7093 )
[DeadCode] Skip mixed fallback null on trait on RemoveAlwaysTrueIfConditionRector (#7098 )
[DeadCode] Skip with first class callable on RemoveUnusedPrivateMethodParameterRector (#7104 )
[DeadCode] Skip with get_defined_vars() on RemoveUnusedPrivateMethodParameterRector ([#7105 ](rectorphp/rector-src#7105
rectorphp/rector-symfony 🎵
[CodeQuality] Skip got duplicated method after suffix removed on ActionSuffixRemoverRector (#827 )
Keep AsCommand in InvokableCommandInputAttributeRector documentation (#824 ), Thanks @bobvandevijver
rectorphp/rector-doctrine 🟠
[CodeQuality] Keep param/return doc with description on TypeNullableEntityFromDocblockRector (#460 )
[code-quality] Add TypeNullableEntityFromDocblockRector to add safe types to doctrine entities (#459 )
rectorphp/rector-phpunit 🟢
Cover array shape iterator for YieldDataProviderRector+RemoveUselessReturnTagRector. (#505 ), Thanks @biozshock
You can’t perform that action at this time.