Download Latest Version Released Rector 2.1.7 source code.tar.gz (1.9 MB)
Email in envelope

Get an email when there's a new version of Rector

Home / 2.1.5
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2025-09-04 13.5 kB
Released Rector 2.1.5 source code.tar.gz 2025-09-04 1.9 MB
Released Rector 2.1.5 source code.zip 2025-09-04 4.2 MB
Totals: 3 Items   6.1 MB 0

Bugfixes :bug:

  • [DX] Pass Class_ stmt on FeatureFlags::treatClassesAsFinal() (#7149)
  • [Renaming] Keep parentheses on RenameCastRector (#7153)
  • [CodeQuality] Skip next inside array_filter() on SimplifyEmptyArrayCheckRector (#7154)
  • Fix code style issues (#7156), Thanks @mttsch!
  • Clean up ternary on ColonAfterSwitchCaseRector (#7158)
  • fix: convert static:: to self:: for all constant access in final classes (#7159), Thanks @calebdw!
  • fix: static to self static method call on final class (#7160), Thanks @calebdw!
  • fix multi-line error message format (#7164), Thanks @FeBe95!
  • Throw Deprecatation on StaticToSelfStaticMethodCallOnFinalClassRector and ConvertStaticPrivateConstantToSelfRector (#7165)
  • [CodeQuality] Skip @final doc with public property on ConvertStaticToSelfRector (#7168)
  • [CodeQuality] Skip @final doc with public class constant on ConvertStaticToSelfRector (#7170)
  • Ensure native ReflectionClassConstant->isFinal() exists by check real php version (#7171)
  • Fix RemoveDuplicatedCaseInSwitchRector behavior (#7173), Thanks @max-s-lab!
  • replace PHP_EOL with \n when used with symfony console (#7174), Thanks @FeBe95!
  • [CodeQuality] Handle parentheses inner if with assign on CombineIfRector (#7179)
  • [DeadCode] Fix merge comments on RemoveAlwaysTrueIfConditionRector (#7181)
  • [Naming] Skip rename override method from /vendor/ on RenameParamToMatchTypeRector (#7182)
  • Fix @see on ArrayKeyExistsNullToEmptyStringRector (#7185)
  • [Php84] Handle named key argument with flipped position on ArrayKeyExistsNullToEmptyStringRector (#7186)
  • skip constructor param hook on ReadOnlyPropertyRector (#7192), Thanks @tandev!
  • [Php84] Skip value extraction on ForeachToArray* rules (#7193)
  • [Scope] Handle Scope refreshing on Attribute on print string with NOWDOC (#7194)
  • [Scope] No need to set startLine/endLine when it already set (#7195)
  • [Transform] Fix example config on FuncCallToNewRector (#7196)
  • use >= for startLine and endLine check (#7198)
  • Keep flag fosRest, jms, sensiolabs on RectorConfigBuilder::withAttributesSets() with direct file (#7205)
  • make use of internal set list (#7208)
  • [Composer] Make InstalledPackageResolver::resolvedInstalledPackages nullable to verify cached package lists (#7210)
  • [AutoImport] Do not rename different namespaced function on auto import + RenameFunctionRector (#7214)
  • Rectify (#7216)


New Features :partying_face:

  • feat: add NarrowTooWideReturnTypeRector (#7150), Thanks @calebdw!
  • [Php85] Add ColonAfterSwitchCaseRector (#7157)
  • feat: add StaticToSelfStaticPropertyFetchOnFinalClassRector (#7161), Thanks @calebdw!
  • feat: Add AddReturnDocblockForScalarArrayFromAssignsRector (#7151), Thanks @imliam!
  • Fix code sample in AddArrayFunctionClosureParamTypeRector (#7163), Thanks @max-s-lab!
  • [TypeDeclaration] Register AddReturnDocblockForScalarArrayFromAssignsRector to type declaration set (#7166)
  • [TypeDeclaration] Skip Valid type from return doc and typed param on AddMethodCallBasedStrictParamTypeRector (#7172)
  • Refactor RemoveDuplicatedCaseInSwitchRector and adding test cases (#7175), Thanks @max-s-lab!
  • [TypeDeclaration] Skip param already typed on AddMethodCallBasedStrictParamTypeRector (#7176)
  • [TypeDeclaration] Clean up type based on doc check on AddMethodCallBasedStrictParamTypeRector (#7177)
  • [TypeDeclaration] Skip integer index on string on AddArrowFunctionParamArrayWhereDimFetchRector (#7178)
  • [Php85] Add ArrayKeyExistsNullToEmptyStringRector (#7183), Thanks @arshidkv12!
  • [Php85] Add fixture to skip integer key on ArrayKeyExistsNullToEmptyStringRector (#7189)
  • [Php85] Add ChrArgModuloRector (#7190), Thanks @arshidkv12!
  • [assert] Kick of experimental rule, AddAssertArrayFromClassMethodDocblockRector (#7206)
  • Improve assert rule (#7207)
  • [php 8.3] Add json_validate rule. (#7213), Thanks @arshidkv12!
  • Add MbStrContainsRector (#7199), Thanks @arshidkv12!
  • make assert rule configurable (#7215)
  • [PHP 8.5] Rename constant FILTER_DEFAULT to FILTER_UNSAFE_RAW (#7209), Thanks @ddevsr!
  • [PHP 8.5] Convert @deprecated to #[\Deprecated] on constants (#7155), Thanks @DanielEScherzer!


Removed :skull:

  • [Php85] Remove calls to deprecated no-op functions (#7128), Thanks @mttsch!
  • [Scoper] Remove PHP_VERSION_ID < 70400 check on scoper.php (#7162)
  • Remove symfony/polyfill-* from replace config (#7167)
  • [DeadCode] Skip non-public __clone() method on RemoveEmptyClassMethodRector (#7187)
  • [8.4][DeprecatedAnnotationToDeprecatedAttributeRector] Remove invalid example (#7202), Thanks @DanielEScherzer!
  • Remove removed "Rector\Symfony\Set\FOSRestSetList/JMSSetList/SensiolabsSetList" usage (#7204)

rectorphp/rector-symfony

  • restore SymfonyInternalSetList to allow relative paths to sets, use internally only (#837)
  • [code-quality] add filter_var() support to ParameterBagTypedGetMethodCallRector (#836)
  • [CodeQuality] Skip first class callable on ParameterBagTypedGetMethodCallRector (#835)
  • [code-quality] Add ParameterBagTypedGetMethodCallRector (#834)
  • [config] add symfony cache pool support to StringExtensionToConfigBuilderRector (#832)
  • [doctrine] add mapping type support to StringExtensionToConfigBuilderRector (#831)
  • [config] Add query/result cache doctrine support in StringExtensionToConfigBuilderRector (#830)
  • [config] Add monolog and dbal fixes to StringExtensionToConfigBuilderRector (#829)
  • [SYMFONY 7.4] replace function call routing (#828), Thanks @JohJohan

rectorphp/rector-phpunit

  • [CodeQuality] Use getNativeMethod on MethodParametersAndReturnTypesResolver (#534)
  • [code-quality] Add ScalarArgumentToExpectedParamTypeRector (#533)
  • [CodeQuality] Fix assertGreater/Less apply on AssertComparisonToSpecificMethodRector (#532)
  • [CodeQuality] Skip docblock based type on AddReturnTypeToDependedRector (#530)
  • Remove unused check return with expr as already covered on ReturnAnalyzer (#529)
  • [code-quality] Add AddReturnTypeToDependedRector (#528)
  • Fix example of return type on AddParamTypeFromDependsRector (#527)
  • add attribute (#526)
  • [code-quality] Add AddParamTypeFromDependsRector (#525)
  • Fix target method on dataProvider on DataProviderAnnotationToAttributeRector (#524)
  • [AnnotationToAttribute] Handle already in use on DataProviderAnnotationToAttributeRector (#523)
  • [CodeQuality] Skip assertEquals() on integer to numeric string on MatchAssertSameExpectedTypeRector (#522)
  • [Alternative 1] Don't change to assertSame() on numeric string on AssertEqualsToSameRector (#520)
  • Revert rule removal of MatchAssertSameExpectedTypeRector (#519)
  • [CodeQuality] Skip already has return type on TypeWillReturnCallableArrowFunctionRector (#518)
  • Drop MatchAssertEqualsExpectedTypeRector (#517)
  • [CodeQuality] Handle crash on native "object" type on TypeWillReturnCallableArrowFunctionRector (#516)
  • [CodeQuality] Skip return createMock() on TypeWillReturnCallableArrowFunctionRector (#515)
  • [CodeQuality] Rename MatchAssertSameExpectedTypeRector to MatchAssertEqualsExpectedTypeRector to only apply on assertEquals (#514)
  • Use Int_ over deprecated LNumber (#513)
  • [CodeQuality] Skip docblock base type on 2nd arg on MatchAssertSameExpectedTypeRector (#512)
  • [CodeQuality] Skip first class callable and argument less on MatchAssertSameExpectedTypeRector (#511)
  • [code-quality] Add MatchAssertSameExpectedTypeRector (#510)
  • add GetMockBuilderGetMockToCreateMockRector to code quality set (#509)

rectorphp/rector-downgrade-php

  • [DowngradePhp83] Add DowngradeJsonValidateRector (#313)
  • [DowngradePhp81] Handle parent is void on DowngradeNeverTypeDeclarationRector (#311)
  • Clean up todo comment (#310)
  • [DowngradePhp81] Skip check version_compare with if on DowngradeHashAlgorithmXxHashRector (part 3) (#309)
  • [DowngradePhp81] Skip check version_compare with ternary on DowngradeHashAlgorithmXxHashRector (part 2) (#308)
  • [DowngradePhp81] Skip check php version with ternary on DowngradeHashAlgorithmXxHashRector (part 1) (#307)
  • [DowngradePhp81] Add PHP_VERSION_ID < 80100 check on DowngradeSetAccessibleReflectionPropertyRector (#306)
Source: README.md, updated 2025-09-04