rectorphp/rector
Instant Upgrades and Automated Refactoring of any PHP 5.3+ code
✨ New Features :partying_face:
- feat: Add AddNameToNullArgumentRector ([#8000](https://github.com/rectorphp/rector-src/pull/8000)), Thanks @calebdw!
- <br>
🐛 Bugfixes :bug:
- fix: skip StaticCallToMethodCallRector when parent declares final __construct ([#8001](https://github.com/rectorphp/rector-src/pull/8001))
- [NodeManipulator] Use ClassReflection parent isFinalByKeyword()->yes() on ClassDependencyManipulator ([#8002](https://github.com/rectorphp/rector-src/pull/8002))
- [BetterPhpDocParser] Don't wrap first-position @method param union in extra parens ([#8003](https://github.com/rectorphp/rector-src/pull/8003)), Thanks @kyle-bisnow!
- [ci] kick of auto issue fixer ([#8004](https://github.com/rectorphp/rector-src/pull/8004))
- [automated] Apply Coding Standard ([#8005](https://github.com/rectorphp/rector-src/pull/8005))
- [CodeQuality] Skip possibly undefined variable on SimplifyEmptyCheckOnEmptyArrayRector ([#8006](https://github.com/rectorphp/rector-src/pull/8006))
- [CodingStyle] Handle namespaced function string on FunctionFirstClassCallableRector ([#8007](https://github.com/rectorphp/rector-src/pull/8007))
- Fix compatibility on optional key on array dim fetch to be Mixed on phpstan patch 2.1.x-dev ([#8008](https://github.com/rectorphp/rector-src/pull/8008))
- + 2 more
📦 rectorphp/rector-symfony
- [QA] Add StructArmed to QA ([#939](https://github.com/rectorphp/rector-symfony/pull/939))
- [Symfony81] add rule for Ulid::isValid() new argument ([#938](https://github.com/rectorphp/rector-symfony/pull/938)), Thanks @MrYamous
- [Symfony81] add rule for Serialiazer method change ([#937](https://github.com/rectorphp/rector-symfony/pull/937)), Thanks @MrYamous
- [Symfony81] add rules for DependencyInjection namespace change ([#936](https://github.com/rectorphp/rector-symfony/pull/936)), Thanks @MrYamous
📝 rectorphp/rector-doctrine
- [QA] Add StructArmed to QA ([#482](https://github.com/rectorphp/rector-doctrine/pull/482))
📦 rectorphp/rector-phpunit
- [QA] Add StructArmed to QA ([#677](https://github.com/rectorphp/rector-phpunit/pull/677))
- fix assert call type resolving ([#675](https://github.com/rectorphp/rector-phpunit/pull/675))
- fix AssertIsTypeMethodCallRector crash on enum case argument ([#674](https://github.com/rectorphp/rector-phpunit/pull/674))
📦 rectorphp/rector-downgrade-php
- [QA] Add StructArmed to QA ([#375](https://github.com/rectorphp/rector-downgrade-php/pull/375))
✨ New Features :partying_face:
- [QA] Add StructArmed to QA ([#7989](https://github.com/rectorphp/rector-src/pull/7989))
- feat: create rector to add names to boolean arguments ([#7944](https://github.com/rectorphp/rector-src/pull/7944)), Thanks @calebdw!
- [CodeQuality] Add missing MinPhpVersionInterface implements on AddNameToBooleanArgumentRector ([#7994](https://github.com/rectorphp/rector-src/pull/7994))
- [injection] If parent class has dependency via promoted property, but its private, add a new one to child class deps ([#7996](https://github.com/rectorphp/rector-src/pull/7996))
- <br>
🐛 Bugfixes :bug:
- Bump structarmed to ^0.6 ([#7990](https://github.com/rectorphp/rector-src/pull/7990))
- [Php81] Skip NullToStrictStringFuncCallArgRector for magic __get() property access resolving to ErrorType ([#7992](https://github.com/rectorphp/rector-src/pull/7992))
- [automated] Apply Coding Standard ([#7993](https://github.com/rectorphp/rector-src/pull/7993))
- [TypeDeclarationDocblocks] Skip overridden methods in DocblockReturnArrayFromDirectArrayInstanceRector ([#7995](https://github.com/rectorphp/rector-src/pull/7995))
- Fix compatibility with latest phpstan patch 2.1.x-dev ([#7997](https://github.com/rectorphp/rector-src/pull/7997))
- Temporary pin webmozart/assert to 2.3.0 to make downgrade working ([#7998](https://github.com/rectorphp/rector-src/pull/7998))
- Bump webmozart/assert to ^2.4 ([#7999](https://github.com/rectorphp/rector-src/pull/7999))
- <br>
🗑️ Removed :skull:
- [DeadCode] Skip used by get_object_vars on RemoveUnusedPromotedPropertyRector ([#7988](https://github.com/rectorphp/rector-src/pull/7988))
📦 rectorphp/rector-symfony
- add fixture with failing parent private ([#935](https://github.com/rectorphp/rector-symfony/pull/935))
- fix ControllerMethodInjectionToConstructorRector - update call sites when params are moved to constructor ([#934](https://github.com/rectorphp/rector-symfony/pull/934))
📦 rectorphp/rector-downgrade-php
- [DowngradePhp82] Handle nullable true on DowngradeStandaloneNullTrueFalseReturnTypeRector ([#374](https://github.com/rectorphp/rector-downgrade-php/pull/374))
✨ New Features :partying_face:
- Add silverstripe-rector link to README ([#7974](https://github.com/rectorphp/rector-src/pull/7974)), Thanks @wernerkrauss!
- <br>
🐛 Bugfixes :bug:
- Fix the behavior of `ClassPropertyAssignToConstructorPromotionRector` when types do not match ([#7972](https://github.com/rectorphp/rector-src/pull/7972)), Thanks @mspirkov!
- Rectify ([#7973](https://github.com/rectorphp/rector-src/pull/7973))
- Bump crate-ci/typos from 1.44.0 to 1.46.0 ([#7976](https://github.com/rectorphp/rector-src/pull/7976)), Thanks @dependabot[bot]!
- [CodeQuality] Skip union type on UseIdenticalOverEqualWithSameTypeRector ([#7975](https://github.com/rectorphp/rector-src/pull/7975))
- [CodingStyle] Mirror comment on SplitDoubleAssignRector ([#7977](https://github.com/rectorphp/rector-src/pull/7977))
- [phpstan] remove copuel fixed phpstan ignores ([#7979](https://github.com/rectorphp/rector-src/pull/7979))
- trigger code analysis on main (https://github.com/rectorphp/rector-src/commit/adb24d01a629b3754abcf967254fe55e7dfa5a3e)
- [CodeQuality] Skip in html for ForRepeatedCountToOwnVariableRector ([#7981](https://github.com/rectorphp/rector-src/pull/7981))
- + 8 more
🗑️ Removed :skull:
- [remove] Remove deprecated StmtsAwareInterface ([#7978](https://github.com/rectorphp/rector-src/pull/7978))
- [remove] Remove deprecated FileWithoutNamespace and ScopeResolverNodeVisitorInterface ([#7980](https://github.com/rectorphp/rector-src/pull/7980))
- remove docker-metadata files, as no longer maintained (https://github.com/rectorphp/rector-src/commit/2166603e4d54f3ffe01fddbd1e16eda5dc5a4fcc)
📦 rectorphp/rector-symfony
- [symfony 2.4] skip no-route in GetRequestRector ([#933](https://github.com/rectorphp/rector-symfony/pull/933))
- fix(CommandHelpToAttributeRector): support concatenated string in setHelp() ([#932](https://github.com/rectorphp/rector-symfony/pull/932)), Thanks @androshchuk
📦 rectorphp/rector-phpunit
- [CodeQuality] Handle on static closure on WithCallbackIdenticalToStandaloneAssertsRector ([#672](https://github.com/rectorphp/rector-phpunit/pull/672))
- ReplaceTestAnnotationWithPrefixedFunctionRector does not match @ test annotation if it is being part of string ([#671](https://github.com/rectorphp/rector-phpunit/pull/671)), Thanks @Dukecz
- [PHPUnit12] Skip used as next arg with MockObject Type on ExpressionCreateMockToCreateStubRector ([#670](https://github.com/rectorphp/rector-phpunit/pull/670))
- [CodeQuality] Skip multiple uses variable as arg after defined on BareCreateMockAssignToDirectUseRector ([#669](https://github.com/rectorphp/rector-phpunit/pull/669))
📦 rectorphp/rector-downgrade-php
- [DowngradePhp80] Handle combine DowngradeMixedTypeDeclarationRector+DowngradeAttributeToAnnotationRector on declare(strict_types=1) inline after open php tag ([#373](https://github.com/rectorphp/rector-downgrade-php/pull/373))
- remove FileWithoutNamespace ([#371](https://github.com/rectorphp/rector-downgrade-php/pull/371))
- Fix phpstan notice on latest phpstan ([#370](https://github.com/rectorphp/rector-downgrade-php/pull/370))
✨ New Features :partying_face:
- Add some symfony/polyfill support ([#7965](https://github.com/rectorphp/rector-src/pull/7965)), Thanks @sreichel!
- [DeadCode] Allow remove useless @ var on aliased object on RemoveUselessVarTagRector ([#7967](https://github.com/rectorphp/rector-src/pull/7967))
- <br>
🐛 Bugfixes :bug:
- [Php81] Handle crash on normal array with variadic inside class on ArrayToFirstClassCallableRector ([#7966](https://github.com/rectorphp/rector-src/pull/7966))
- [CodeQuality] Skip possibly undefined variable on CoalesceToTernaryRector ([#7968](https://github.com/rectorphp/rector-src/pull/7968))
- [Php70] Allow is_null() conversion on TernaryToNullCoalescingRector with parentheses handling ([#7969](https://github.com/rectorphp/rector-src/pull/7969))
- Bump to PHPStan ^2.1.47 ([#7970](https://github.com/rectorphp/rector-src/pull/7970))
- Bump to PHPStan ^2.1.48 ([#7971](https://github.com/rectorphp/rector-src/pull/7971))
- <br>
📦 rectorphp/rector-symfony :musical_note:
- Fix unit test due to new PHPStan release ([#931](https://github.com/rectorphp/rector-symfony/pull/931))
✨ New Features :partying_face:
- [DeadCode] Add `RemoveUselessTernaryRector` ([#7961](https://github.com/rectorphp/rector-src/pull/7961))
- [CodeQuality] Add `CoalesceToTernaryRector` ([#7960](https://github.com/rectorphp/rector-src/pull/7960))
- Add `--rules-summary` option to display applied rules summary with count ([#7874](https://github.com/rectorphp/rector-src/pull/7874)), Thanks @carlos-granados!
- Add support for adding the `#[Override]` attribute to methods implementing interfaces ([#7934](https://github.com/rectorphp/rector-src/pull/7934)), Thanks @hockdudu!
- feat(printer): add per-node NEWLINE_ON_FLUENT_CALL attribute to BetterStandardPrinter ([#7910](https://github.com/rectorphp/rector-src/pull/7910)), Thanks @MrPunyapal!
- Show line numbers in diff output ([#7875](https://github.com/rectorphp/rector-src/pull/7875)), Thanks @carlos-granados!
- <br>
🐛 Bugfixes :bug:
- [CodeQuality] Skip with HTML on CompleteMissingIfElseBracketRector ([#7952](https://github.com/rectorphp/rector-src/pull/7952))
- [CodeQuality] Handle with assign on SimplifyIfElseToTernaryRector ([#7951](https://github.com/rectorphp/rector-src/pull/7951))
- [CodeQuality] Skip with HTML on TernaryFalseExpressionToIfRector ([#7954](https://github.com/rectorphp/rector-src/pull/7954))
- [automated] Apply Coding Standard ([#7955](https://github.com/rectorphp/rector-src/pull/7955))
- Make compatible with PHPStan 2.1.x-dev for ObjectType::equals() change behaviour ([#7956](https://github.com/rectorphp/rector-src/pull/7956))
- [AutoImport] Handle FQCN in/not in use on auto import + remove unused import as prefix = suffix ([#7957](https://github.com/rectorphp/rector-src/pull/7957))
- perf: use hash map for installed packages ([#7878](https://github.com/rectorphp/rector-src/pull/7878)), Thanks @calebdw!
- [ChangesReporting][Alternative] Collect changed_files on --no-diffs with json output with use of JsonOutputFactory ([#7821](https://github.com/rectorphp/rector-src/pull/7821))
- + 2 more
🗑️ Deprecations :skull:
- [Php81] Deprecate `NewInInitializerRector` as depends on context ([#7913](https://github.com/rectorphp/rector-src/pull/7913))
- [deprecation] deprecate file, use getFile() instead ([#7962](https://github.com/rectorphp/rector-src/pull/7962))
✨ New Features :partying_face:
- chore: add `SafeDeclareStrictTypesRector` to code quality set ([#7935](https://github.com/rectorphp/rector-src/pull/7935)), Thanks @calebdw!
- [Caching] Add CacheMetaExtensionInterface for custom cache invalidation ([#7933](https://github.com/rectorphp/rector-src/pull/7933)), Thanks @ruudk!
- feat(php86): add min/max to clamp rector ([#7942](https://github.com/rectorphp/rector-src/pull/7942)), Thanks @calebdw!
- <br>
🐛 Bugfixes :bug:
- [Php85] Do not convert to pipe on use directly of spread operator on NestedFuncCallsToPipeOperatorRector ([#7938](https://github.com/rectorphp/rector-src/pull/7938))
- [Console] Allow short command "p" on ProcessCommand ([#7931](https://github.com/rectorphp/rector-src/pull/7931))
- [Arguments] Skip self class const fetch inside this class target replacement on ReplaceArgumentDefaultValueRector ([#7940](https://github.com/rectorphp/rector-src/pull/7940))
- [CodeQuality] Hnadle with negation binary op previous if on CombineIfRector ([#7945](https://github.com/rectorphp/rector-src/pull/7945))
- [CodingStyle] Skip by reference required params on call inside on ArrowFunctionDelegatingCallToFirstClassCallableRector ([#7949](https://github.com/rectorphp/rector-src/pull/7949))
- <br>
🗑️ Removed :skull:
- [DeadCode] Skip pipe operator on RemoveDeadStmtRector ([#7941](https://github.com/rectorphp/rector-src/pull/7941))
- [DeadCode] Handle crash on multi elseif on RemoveDeadIfBlockRector ([#7946](https://github.com/rectorphp/rector-src/pull/7946))
- [DeadCode] Skip with assign to call with target has #[NoDiscard] attribute on RemoveUnusedVariableAssignRector ([#7950](https://github.com/rectorphp/rector-src/pull/7950))
- <br>
📦 rectorphp/rector-symfony :musical_note:
- [CodeQuality] Handle different parameter type same name used on ControllerMethodInjectionToConstructorRector ([#929](https://github.com/rectorphp/rector-symfony/pull/929))
- [CodeQuality] Skip used by static closure use on ControllerMethodInjectionToConstructorRector ([#928](https://github.com/rectorphp/rector-symfony/pull/928))
- [Symfony61] Skip non static external class callable on MagicClosureTwigExtensionToNativeMethodsRector ([#927](https://github.com/rectorphp/rector-symfony/pull/927)), Thanks @wuchen90
- <br>
📝 rectorphp/rector-doctrine :orange_circle:
- Fix infinite loop check instanceof name check to use Name class ([#481](https://github.com/rectorphp/rector-doctrine/pull/481))
- <br>
📦 rectorphp/rector-phpunit :green_circle:
- [PHPunit 9] Move AssertRegExpRector to phpunit 90 set with refactor to use assertMatchesRegularExpression/assertDoesNotMatchRegularExpression ([#667](https://github.com/rectorphp/rector-phpunit/pull/667))
- [PHPUnit 9] Rename assertRegExp/assertNotRegExp to assertMatchesRegularExpression/assertDoesNotMatchRegularExpression on phpunit 90 set ([#666](https://github.com/rectorphp/rector-phpunit/pull/666))
- Fix assert PHPStan on ConfiguredMockEntityToSetterObjectRector ([#665](https://github.com/rectorphp/rector-phpunit/pull/665))
✨ New Features :partying_face:
- [CodingStyle] Add `StrictInArrayRector` ([#7921](https://github.com/rectorphp/rector-src/pull/7921))
- <br>
🐛 Bugfixes :bug:
- [Php71] Handle crash on partial destruct on assign var on ListToArrayDestructRector ([#7909](https://github.com/rectorphp/rector-src/pull/7909))
- [CodeQuality] Skip no code parameter on custom Throwable instance on ThrowWithPreviousExceptionRector ([#7912](https://github.com/rectorphp/rector-src/pull/7912))
- Bump to PHPStan ^2.1.40 and utilize ClassConstantReflection->isFinalByKeyword() ([#7911](https://github.com/rectorphp/rector-src/pull/7911))
- [Php70] Handle keep right parentheses on ternary else is BinaryOp on TernaryToNullCoalescingRector ([#7916](https://github.com/rectorphp/rector-src/pull/7916))
- Properly build text node for junit output formatter ([#7917](https://github.com/rectorphp/rector-src/pull/7917)), Thanks @brandonja991!
- [CodeQuality] Skip with custom param in previous position on ThrowWithPreviousExceptionRector ([#7919](https://github.com/rectorphp/rector-src/pull/7919))
- [automated] Apply Coding Standard ([#7922](https://github.com/rectorphp/rector-src/pull/7922))
- [DX] Define list of allowed implicit commands on ConsoleApplication ([#7918](https://github.com/rectorphp/rector-src/pull/7918))
- + 5 more
📦 rectorphp/rector-symfony :musical_note:
- [CodeQuality] Allow Doctrine EntityManagerInterface on ControllerMethodInjectionToConstructorRector ([#926](https://github.com/rectorphp/rector-symfony/pull/926))
- [CodeQuality] Skip has conflicted param name different object on different method on ControllerMethodInjectionToConstructorRector ([#925](https://github.com/rectorphp/rector-symfony/pull/925))
- [Symfony73] Handle with set allowExtraFields named argument on ConstraintOptionsToNamedArgumentsRector ([#924](https://github.com/rectorphp/rector-symfony/pull/924))
- Skip classes with Symfony 7.1 Workflow listener attributes ([#923](https://github.com/rectorphp/rector-symfony/pull/923)), Thanks @dionisvl
- <br>
📝 rectorphp/rector-doctrine :orange_circle:
- [TypedCollections] Skip with string key already on CompleteReturnDocblockFromToManyRector ([#480](https://github.com/rectorphp/rector-doctrine/pull/480))
- <br>
📦 rectorphp/rector-phpunit :green_circle:
- [CodeQuality] Skip test method via #[Test] Attribute on DataProviderArrayItemsNewLinedRector ([#664](https://github.com/rectorphp/rector-phpunit/pull/664))
- skip conflicting return node and return type in TypeWillReturnCallableArrowFunctionRector! ([#663](https://github.com/rectorphp/rector-phpunit/pull/663))
- [Phpunit12] Skip as Argument with required MockObject Type on CreateStubOverCreateMockArgRector ([#662](https://github.com/rectorphp/rector-phpunit/pull/662))
- feat: add IntersectionType support to PropertyCreateMockToCreateStubRector ([#661](https://github.com/rectorphp/rector-phpunit/pull/661)), Thanks @asumikam
🐛 Bugfixes :bug:
- [CodeQuality] Only allow from final class or constant is marked final on VariableConstFetchToClassConstFetchRector ([#7904](https://github.com/rectorphp/rector-src/pull/7904))
- [CodeQuality] Skip custom exception param order flipped on no namespace on ThrowWithPreviousExceptionRector ([#7906](https://github.com/rectorphp/rector-src/pull/7906))
- [DeadCode] Skip different default param not typed on RemoveParentDelegatingConstructorRector ([#7905](https://github.com/rectorphp/rector-src/pull/7905))
- [DeadCode] Skip non-literal 0 or 1 usage on RemoveDeadZeroAndOneOperationRector ([#7907](https://github.com/rectorphp/rector-src/pull/7907))
- [TypeDeclarationDocblocks] Typo fix RuleDefinition description on AddVarArrayDocblockFromDimFetchAssignRector ([#7902](https://github.com/rectorphp/rector-src/pull/7902))
- [Php83] Fix infinite add - remove #[Override] on tearDown() method on AddOverrideAttributeToOverriddenMethodsRector when combined with NoSetupWithParentCallOverrideRector ([#7903](https://github.com/rectorphp/rector-src/pull/7903))
📦 rectorphp/rector-symfony
- [CodeQuality] Skip symfony UuidV4 on ControllerMethodInjectionToConstructorRector ([#922](https://github.com/rectorphp/rector-symfony/pull/922))
✨ New Features :partying_face:
- feat: add ComposerPackageConstraintInterface ([#7877](https://github.com/rectorphp/rector-src/pull/7877)), Thanks @calebdw!
- Add AddOverrideAttributeToOverriddenPropertiesRector for PHP 8.5 ([#7880](https://github.com/rectorphp/rector-src/pull/7880)), Thanks @carlos-granados!
- <br>
🐛 Bugfixes :bug:
- Skip ClosureToArrowFunctionRector when closure has @ var docblock ([#7885](https://github.com/rectorphp/rector-src/pull/7885)), Thanks @QDenka!
- [Php80] Skip property hook with indirect set on ClassPropertyAssignToConstructorPromotionRector ([#7887](https://github.com/rectorphp/rector-src/pull/7887))
- [Php70] Keep right parentheses on TernaryToNullCoalescingRector ([#7889](https://github.com/rectorphp/rector-src/pull/7889))
- Bump nette/utils to ^4.1.3 (part 2) ([#7894](https://github.com/rectorphp/rector-src/pull/7894))
- [Php72] Handle crash on hex backreference on PregReplaceEModifierRector ([#7896](https://github.com/rectorphp/rector-src/pull/7896))
- Update code sample for SimplifyEmptyCheckOnEmptyArrayRector ([#7897](https://github.com/rectorphp/rector-src/pull/7897)), Thanks @ramonrietdijk!
- [Php80] Handle Behat transform annotation ([#7899](https://github.com/rectorphp/rector-src/pull/7899)), Thanks @loic425!
- fix: Skip attribute decorated parameters in `RemoveParentDelegatingConstructorRector` ([#7900](https://github.com/rectorphp/rector-src/pull/7900)), Thanks @marcreichel!
- + 3 more
📦 rectorphp/rector-symfony :musical_note:
- [CodeQuality] Skip DateTimeInterface instance on ControllerMethodInjectionToConstructorRector ([#921](https://github.com/rectorphp/rector-symfony/pull/921))
- [Symfony73] Skip with @ Translate docblock on ConstraintOptionsToNamedArgumentsRector ([#920](https://github.com/rectorphp/rector-symfony/pull/920))
- <br>
📦 rectorphp/rector-phpunit :green_circle:
- [PhpUnit 8] Skip on possible return array on SpecificAssertContainsRector ([#660](https://github.com/rectorphp/rector-phpunit/pull/660))
- [CodeQuality] check class exists on BehatPHPUnitAssertToWebmozartRector ([#659](https://github.com/rectorphp/rector-phpunit/pull/659))
- [behat] Add `BehatPHPUnitAssertToWebmozzartRector` ([#658](https://github.com/rectorphp/rector-phpunit/pull/658))
- [code-quality] Add `AddKeysExistsAssertForKeyUseRector` ([#657](https://github.com/rectorphp/rector-phpunit/pull/657))
- [PHPUnit120] Skip non-mock object on AllowMockObjectsWithoutExpectationsAttributeRector ([#656](https://github.com/rectorphp/rector-phpunit/pull/656))
- [CodeQuality] Skip on non-mock object on DecorateWillReturnMapWithExpectsMockRector ([#655](https://github.com/rectorphp/rector-phpunit/pull/655))
- [CodeQuality] Skip first class callable on DecorateWillReturnMapWithExpectsMockRector ([#654](https://github.com/rectorphp/rector-phpunit/pull/654))
- improve DecorateWillReturnMapWithExpectsMockRector edge cases ([#653](https://github.com/rectorphp/rector-phpunit/pull/653))
- + 3 more
📦 rectorphp/rector-downgrade-php :arrow_down:
- [DowngradePhp82] Add `DowngradeUnionIntersectionRector` ([#363](https://github.com/rectorphp/rector-downgrade-php/pull/363))
- [DowngradePhp80] Fix combine DowngradeThrowExprRector + DowngradeNullsafeToTernaryOperatorRector ([#362](https://github.com/rectorphp/rector-downgrade-php/pull/362))
- [DowngradePhp80] Fix on Arg and return ternary on DowngradeThrowExprRector ([#361](https://github.com/rectorphp/rector-downgrade-php/pull/361))
✨ New Features :partying_face:
- Allow using a canonical `rector.dist.php` dist file ([#7845](https://github.com/rectorphp/rector-src/pull/7845)), Thanks @carlos-granados!
- <br>
🐛 Bugfixes :bug:
- [Php83] Handle parent class consume trait on AddOverrideAttributeToOverriddenMethodsRector ([#7868](https://github.com/rectorphp/rector-src/pull/7868))
- Fix fixture source warning on AddOverrideAttributeToOverriddenMethodsRector (missing TestCase suffix) ([#7869](https://github.com/rectorphp/rector-src/pull/7869))
- add JSON_THROW_ON_ERROR even if there is already a flag ([#7867](https://github.com/rectorphp/rector-src/pull/7867)), Thanks @Lenny4!
- [DeadCode] No need additional parentheses () on multiply to function call ([#7883](https://github.com/rectorphp/rector-src/pull/7883))
- [Php80] Handle crash on empty name attribute field value on AnnotationToAttributeRector ([#7864](https://github.com/rectorphp/rector-src/pull/7864))
- Fix JsonValidateRector: remove associative argument not supported by json_validate ([#7865](https://github.com/rectorphp/rector-src/pull/7865)), Thanks @carlos-granados!
- Fix deep ArrayItem scope filling on Foreach_ value ([#7873](https://github.com/rectorphp/rector-src/pull/7873))
- Fix StaticCallOnNonStaticToInstanceCallRector for same-class calls ([#7876](https://github.com/rectorphp/rector-src/pull/7876)), Thanks @carlos-granados!
- + 4 more
📦 rectorphp/rector-symfony :musical_note:
- Update set usage in readme ([#919](https://github.com/rectorphp/rector-symfony/pull/919)), Thanks @MrYamous
- <br>
📦 rectorphp/rector-phpunit :green_circle:
- [phpunit 12] Add CreateStubInCoalesceArgRector ([#650](https://github.com/rectorphp/rector-phpunit/pull/650))
- [code-quality] Add DecorateWillReturnMapWithExpectsMockRector ([#649](https://github.com/rectorphp/rector-phpunit/pull/649))
- [code-quality] Add RemoveStandaloneCreateMockRector ([#648](https://github.com/rectorphp/rector-phpunit/pull/648))
- add class method ([#647](https://github.com/rectorphp/rector-phpunit/pull/647))
- improve check for used mock property ([#646](https://github.com/rectorphp/rector-phpunit/pull/646))
- skip if used in array ([#645](https://github.com/rectorphp/rector-phpunit/pull/645))
- [code-quality] Add RemoveNeverUsedMockPropertyRector ([#644](https://github.com/rectorphp/rector-phpunit/pull/644))
- [phpunit 12] Add AllowMockObjectsForDataProviderRector ([#643](https://github.com/rectorphp/rector-phpunit/pull/643))
- + 17 more
✨ New Features :partying_face:
- feat: create new `SafeDeclareStrictTypesRector` ([#7814](https://github.com/rectorphp/rector-src/pull/7814)), Thanks @calebdw!
- <br>
🐛 Bugfixes :bug:
- Fix ArrayItem scope filling on Foreach_ value ([#7858](https://github.com/rectorphp/rector-src/pull/7858))
- Fix use of deprecated Node\Expr\ArrayItem over Node\ArrayItem ([#7859](https://github.com/rectorphp/rector-src/pull/7859))
- make PropertyFetchFinder more generic (to be used in rector-phpunit) ([#7860](https://github.com/rectorphp/rector-src/pull/7860))
- Fix arrow function scope search in BetterNodeFinder ([#7861](https://github.com/rectorphp/rector-src/pull/7861))
- <br>
📦 rectorphp/rector-symfony :musical_note:
- Rename Annotation\Route attributes to Attribute\Route on Symfony 7.x ([#917](https://github.com/rectorphp/rector-symfony/pull/917)), Thanks @mickverm
- <br>
📝 rectorphp/rector-doctrine :orange_circle:
- [ODM 2.16] Rename 'Doctrine\ODM\MongoDB\Mapping\Annotations' namespace to 'Doctrine\ODM\MongoDB\Mapping\Attribute' ([#477](https://github.com/rectorphp/rector-doctrine/pull/477)), Thanks @mickverm
- <br>
📦 rectorphp/rector-phpunit :green_circle:
- [code-quality] Add `NoSetupWithParentCallOverrideRector` ([#617](https://github.com/rectorphp/rector-phpunit/pull/617))
- [code-quality] Add BareCreateMockAssignToDirectUseRector ([#611](https://github.com/rectorphp/rector-phpunit/pull/611))
- [code-quality] Add `DirectInstanceOverMockArgRector` ([#609](https://github.com/rectorphp/rector-phpunit/pull/609))
- [PHPUnit 12] Add `CreateStubOverCreateMockArgRector` ([#608](https://github.com/rectorphp/rector-phpunit/pull/608))
🐛 Bugfixes :bug:
- Bump to PHPStan ^2.1.36 ([#7850](https://github.com/rectorphp/rector-src/pull/7850))
- [Php81] Exclude Doctrine ODM MongoDB 2.16 Document and EmbeddedDocument from ReadOnlyPropertyRector. ([#7848](https://github.com/rectorphp/rector-src/pull/7848)), Thanks @mickverm!
🐛 Bugfixes :bug:
- https://github.com/rectorphp/rector-src/commit/61f8719064d11d2a4ae9f6801d601446b35b51a4 Pin PHPStan 2.1.34, as 2.1.35 introduced a complex regression breaking Rector - see https://github.com/rectorphp/rector-src/pull/7847
✨ New Features :partying_face:
- [dx] Rename `DeprecatedAnnotationToDeprecatedAttributeRector` for PHP 8.5 to explicit ConstAndTraitDeprecatedAttributeRector, add trait suport ([#7823](https://github.com/rectorphp/rector-src/pull/7823))
- <br>
🐛 Bugfixes :bug:
- Bump to PHPStan 2.1.34 and fix compatible code (https://github.com/rectorphp/rector-src/pull/7844)
- [perf] optimize ParamTypeByMethodCallTypeRector for speed with early checks ([#7831](https://github.com/rectorphp/rector-src/pull/7831))
- make resolveClassReflection non-nullable as always passed a node ([#7833](https://github.com/rectorphp/rector-src/pull/7833))
- [Php74] Skip closure in attribute on ClosureToArrowFunctionRector ([#7834](https://github.com/rectorphp/rector-src/pull/7834))
- Manage named arguments when removing values ([#7835](https://github.com/rectorphp/rector-src/pull/7835)), Thanks @carlos-granados!
- bump to PHP 8.3 + update deps + allow it in CI ([#7838](https://github.com/rectorphp/rector-src/pull/7838))
- Support array_values in ArrayFirstLastRector ([#7830](https://github.com/rectorphp/rector-src/pull/7830)), Thanks @Orest-Divintari!
- [Php85] Skip as assigned var/op on ArrayFirstLastRector ([#7843](https://github.com/rectorphp/rector-src/pull/7843))
- + 2 more
📦 rectorphp/rector-phpunit :green_circle:
- fix a class name that should be string ([#607](https://github.com/rectorphp/rector-phpunit/pull/607))
- Support array_values in ArrayFirstLastRector ([#7830](https://github.com/rectorphp/rector-src/pull/7830)), Thanks @Orest-Divintari!
- [Php85] Skip as assigned var/op on ArrayFirstLastRector ([#7843](https://github.com/rectorphp/rector-src/pull/7843))
✨ New Features and Changes :partying_face:
- [tdd] Add `AddReturnDocblockForDimFetchArrayFromAssignsRector` ([#7792](https://github.com/rectorphp/rector-src/pull/7792))
- [tdd] Add `AddReturnDocblockFromMethodCallDocblockRector` ([#7796](https://github.com/rectorphp/rector-src/pull/7796))
- [tdd] Add `AddVarArrayDocblockFromDimFetchAssignRector` ([#7801](https://github.com/rectorphp/rector-src/pull/7801))
- [DeadCode] Add `RemoveDeadIfBlocksRector` ([#7528](https://github.com/rectorphp/rector-src/pull/7528)), Thanks @john-shaffer!
- [dead-code] Add `RemoveVoidDocblockFromMagicMethodRector` ([#7822](https://github.com/rectorphp/rector-src/pull/7822)) - Thanks @parijke!
- [experiment] Remove leaveNode() method on AbstractRector and CallableNodeVisitor ([#7767](https://github.com/rectorphp/rector-src/pull/7767))
- <br>
🐛 Bugfixes :bug:
- Skip Doctrine Connection calls in `AddReturnDocblockFromMethodCallDocblockRector` ([#7797](https://github.com/rectorphp/rector-src/pull/7797))
- add static all support to `AddReturnDocblockFromMethodCallDocblockRector` ([#7798](https://github.com/rectorphp/rector-src/pull/7798))
- add object support to `DocblockReturnArrayFromDirectArrayInstanceRector` ([#7795](https://github.com/rectorphp/rector-src/pull/7795))
- [TypeDeclarationDocblocks] Use FQCN return docblock for array of object types on AddReturnDocblockFromMethodCallDocblockRector ([#7800](https://github.com/rectorphp/rector-src/pull/7800)), Thanks @guanguans!
- [php 8.3] cover private abstract constants in `AddTypeToConstRector` ([#7804](https://github.com/rectorphp/rector-src/pull/7804))
- Add check for append in foreach items assignment ([#7815](https://github.com/rectorphp/rector-src/pull/7815)), Thanks @solverat!
- Static closure rule ignores arguments with $this binding ([#7721](https://github.com/rectorphp/rector-src/pull/7721)), Thanks @peterfox!
- fix: skip non-native methods ([#7747](https://github.com/rectorphp/rector-src/pull/7747)), Thanks @calebdw!
- + 16 more
✨ New Features :partying_face:
- Introduce `FileNode` to handle file-level changes ([#7728](https://github.com/rectorphp/rector-src/pull/7728)) to be used instead of `FileWithoutNamespace` node - see https://github.com/rectorphp/rector-src/blob/main/UPGRADING.md for the upgrade
- Add `PrivatizeFinalClassConstantRector` ([#7753](https://github.com/rectorphp/rector-src/pull/7753)), Thanks @simonschaufi!
- [dead-code] Add `RemoveParentDelegatingConstructorRector` ([#7769](https://github.com/rectorphp/rector-src/pull/7769))
- <br>
🐛 Bugfixes :bug:
- Manage named arguments in ArgumentAdderRector rule ([#7777](https://github.com/rectorphp/rector-src/pull/7777)), Thanks @carlos-granados!
- [compat] Add `SymplifyQuoteEscapeRector` deprecated rule for BC layer ([#7744](https://github.com/rectorphp/rector-src/pull/7744))
- [Php81] Skip on Param default on ArrayToFirstClassCallableRector ([#7749](https://github.com/rectorphp/rector-src/pull/7749))
- [CodeQuality] Handle ternary in identical left/right on UseIdenticalOverEqualWithSameTypeRector ([#7748](https://github.com/rectorphp/rector-src/pull/7748))
- fix: chained calls on static calls ([#7746](https://github.com/rectorphp/rector-src/pull/7746)), Thanks @calebdw!
- [code-quality] Extract standalone SortAttributeNamedArgsRector from SortNamedParamRector, to slightly different areas ([#7750](https://github.com/rectorphp/rector-src/pull/7750))
- [rename] Rename `SortNamedParamRector` to `SortCallLikeNamedArgsRector` to be more clear about the intent ([#7751](https://github.com/rectorphp/rector-src/pull/7751))
- [Php85] Skip under unset() on ArrayFirstLastRector ([#7752](https://github.com/rectorphp/rector-src/pull/7752))
- + 6 more
🗑️ Removed :skull:
- [DeadCode] Skip trait on RemoveAlwaysTrueIfConditionRector ([#7759](https://github.com/rectorphp/rector-src/pull/7759))
- [internal] Remove duplicated enterNode() type check already handled in node traverser ([#7717](https://github.com/rectorphp/rector-src/pull/7717))
- [dx] warn about deprecated beforeTraverse() method once FileNode is ready ([#7768](https://github.com/rectorphp/rector-src/pull/7768))
- [DeadCode] Skip next assign expr has side effect inside try {} on RemoveDoubleAssignRector ([#7775](https://github.com/rectorphp/rector-src/pull/7775))
- [DeadCode] Skip with different default param value child vs parent on RemoveParentDelegatingConstructorRector ([#7776](https://github.com/rectorphp/rector-src/pull/7776))
- <br>
📦 rectorphp/rector-symfony :musical_note:
- bump ([#911](https://github.com/rectorphp/rector-symfony/pull/911))
- [code-quality] Add ReturnDirectJsonResponseRector ([#910](https://github.com/rectorphp/rector-symfony/pull/910))
- Fix scoped downgrade SymfonyClass ([#909](https://github.com/rectorphp/rector-symfony/pull/909))
- cover is safe ([#908](https://github.com/rectorphp/rector-symfony/pull/908))
- [twig] add explicit attribute name arg, to improve context ([#907](https://github.com/rectorphp/rector-symfony/pull/907))
- [Symfony73] Fix named arg different position crash on InvokableCommandInputAttributeRector ([#905](https://github.com/rectorphp/rector-symfony/pull/905))
- [CodeQuality] Skip UserInterface instance on ControllerMethodInjectionToConstructorRector ([#904](https://github.com/rectorphp/rector-symfony/pull/904))
- create ClassMethod directly in InvokableCommandInputAttributeRector, to keep newline per attribute ([#903](https://github.com/rectorphp/rector-symfony/pull/903))
- + 3 more
📝 rectorphp/rector-doctrine :orange_circle:
- Make use of `FileNode` ([#474](https://github.com/rectorphp/rector-doctrine/pull/474))
- <br>
📦 rectorphp/rector-phpunit :green_circle:
- [AnnotationsToAttributes] Handle both annotation and attributes exists on DataProviderAnnotationToAttributeRector ([#603](https://github.com/rectorphp/rector-phpunit/pull/603))
- [fix] skip AddInstanceofAssertForNullableArgumentRector on assert call ([#602](https://github.com/rectorphp/rector-phpunit/pull/602))
- [code-quality] Add AddInstanceofAssertForNullableArgumentRector ([#601](https://github.com/rectorphp/rector-phpunit/pull/601))
- use FileNode in DeclareStrictTypesTestsRector ([#599](https://github.com/rectorphp/rector-phpunit/pull/599))
🐛 Bugfixes :bug:
- [fix] warn early about deprecated skipped rules, as not neccessary to skip anymore + restore `FirstClassCallableRector` and mark as deprecated to keep BC ([#7742](https://github.com/rectorphp/rector-src/pull/7742))
🐛 Bugfixes :bug:
- [fix] restore missing pInterpolatedStringPart(), cover with test ([#7741](https://github.com/rectorphp/rector-src/pull/7741))
🐛 Bugfixes :bug:
- [cleanup] Make FirstClassCallableRector use attributes over node traverser hacks ([#7696](https://github.com/rectorphp/rector-src/pull/7696))
- [CodingStyle] Skip enum case on `NewlineBetweenClassLikeStmtsRector` ([#7698](https://github.com/rectorphp/rector-src/pull/7698)), Thanks @parth391!
- [fix] skip all-but standalone assign on `SetTypeToCastRector` ([#7699](https://github.com/rectorphp/rector-src/pull/7699))
- [fix] avoid changing generic interface in NarrowObjectReturnTypeRector, focus on objects as in definition ([#7700](https://github.com/rectorphp/rector-src/pull/7700))
- Remove direct `NodeTravser::*` where possible, use node visitor attribute key instead ([#7697](https://github.com/rectorphp/rector-src/pull/7697))
- <br>
🗑️ Removed and Deprecated :skull:
- [dx] add stmts aware deprecation notice in `getNodeTypes()`` ([#7692](https://github.com/rectorphp/rector-src/pull/7692))
- <br>
📦 rectorphp/rector-symfony :musical_note:
- [Symfony 8.0] move `RemoveEraseCredentialsRector` from symfony 7.3 to symfony 8.0 ([#895](https://github.com/rectorphp/rector-symfony/pull/895)), Thanks @EJTJ3
- [CodeQuality] Skip different service same name on `ControllerMethodInjectionToConstructorRector` ([#894](https://github.com/rectorphp/rector-symfony/pull/894))
- [code-quality] Skip enum in `ControllerMethodInjectionToConstructorRector` ([#893](https://github.com/rectorphp/rector-symfony/pull/893))
🐛 Bugfixes :bug:
- [cleanup] Make FirstClassCallableRector use attributes over node traverser hacks ([#7696](https://github.com/rectorphp/rector-src/pull/7696))
- [CodingStyle] Skip enum case on NewlineBetweenClassLikeStmtsRector ([#7698](https://github.com/rectorphp/rector-src/pull/7698)), Thanks @parth391!
- [fix] skip all-but standalone assign on SetTypeToCastRector ([#7699](https://github.com/rectorphp/rector-src/pull/7699))
- [fix] avoid changing generic interface in NarrowObjectReturnTypeRector, focus on objects as in definition ([#7700](https://github.com/rectorphp/rector-src/pull/7700))
- [transform] tidy up array dim fetch to method call rector ([#7694](https://github.com/rectorphp/rector-src/pull/7694))
- Remove direct NodeTravser::* where possible, use node visitor attribute key instead ([#7697](https://github.com/rectorphp/rector-src/pull/7697))
- <br>
🗑️ Removed and Deprecated :skull:
- [dx] add stmts aware deprecation notice in getNodeTypes() ([#7692](https://github.com/rectorphp/rector-src/pull/7692))
- <br>
📦 rectorphp/rector-symfony
- [Symfony 8.0] move `RemoveEraseCredentialsRector` from symfony 7.3 to symfony 8.0 ([#895](https://github.com/rectorphp/rector-symfony/pull/895)), Thanks @EJTJ3
- [CodeQuality] Skip different service same name on `ControllerMethodInjectionToConstructorRector` ([#894](https://github.com/rectorphp/rector-symfony/pull/894))
- [code-quality] Skip enum in `ControllerMethodInjectionToConstructorRector` ([#893](https://github.com/rectorphp/rector-symfony/pull/893))
✨ New Features and Improvements :partying_face:
- Support Attribute in `SortNamedParamRector` ([#7684](https://github.com/rectorphp/rector-src/pull/7684)), Thanks @VincentLanglet!
- <br>
🐛 Bugfixes :bug:
- [PhpParser] Add Stmt\Block to NodeGroup::STMTS_AWARE ([#7689](https://github.com/rectorphp/rector-src/pull/7689))
- skip already dim fetch variable on OrdSingleByteRector ([#7681](https://github.com/rectorphp/rector-src/pull/7681))
- [Php85] Handle crash on no arg on OrdSingleByteRector ([#7682](https://github.com/rectorphp/rector-src/pull/7682))
- [Php70] Handle return ternary on IfIssetToCoalescingRector ([#7683](https://github.com/rectorphp/rector-src/pull/7683))
- [CodingStyle] Skip use trait on NewlineBetweenClassLikeStmtsRector ([#7685](https://github.com/rectorphp/rector-src/pull/7685))
- [CodingStyle] Handle use trait after property on `NewlineBetweenClassLikeStmtsRector` ([#7687](https://github.com/rectorphp/rector-src/pull/7687))
- [CodeQuality] Skip with HTML on `ShortenElseIfRector` ([#7686](https://github.com/rectorphp/rector-src/pull/7686))
- [Variables] Fetch list super global variable names from PHPStan Scope::SUPERGLOBAL_VARIABLES constant ([#7663](https://github.com/rectorphp/rector-src/pull/7663))
- + 2 more
📦 rectorphp/rector-symfony :musical_note:
- [code-quality] Skip enum in ControllerMethodInjectionToConstructorRector ([#893](https://github.com/rectorphp/rector-symfony/pull/893))
- [symfony 7.3] Add CommandDefaultNameAndDescriptionToAsCommandAttributeRector ([#892](https://github.com/rectorphp/rector-symfony/pull/892))
- [symfony 7.x] update sets ([#890](https://github.com/rectorphp/rector-symfony/pull/890))
- [CodeQuality] Skip parent method exists on ControllerMethodInjectionToConstructorRector ([#889](https://github.com/rectorphp/rector-symfony/pull/889))
- skip params with attributes in ControllerMethodInjectionToConstructorRector ([#887](https://github.com/rectorphp/rector-symfony/pull/887))
- [stmts-aware] Use NodeGroup::STMTS_AWARE over StmtsAwareInterface ([#886](https://github.com/rectorphp/rector-symfony/pull/886))
- <br>
📦 rectorphp/rector-phpunit :green_circle:
- [fix] Improve AssertComparisonToSpecificMethodRector for assert false ([#594](https://github.com/rectorphp/rector-phpunit/pull/594))
✨ New Features and Changes :partying_face:
- [exp] Add `RemoveReturnThisFromSetterClassMethodRector` ([#7624](https://github.com/rectorphp/rector-src/pull/7624))
- [exp] Add `FluentSettersToStandaloneCallMethodRector` ([#7625](https://github.com/rectorphp/rector-src/pull/7625))
- [dead-code] Add `RemoveNextSameValueConditionRector` ([#7525](https://github.com/rectorphp/rector-src/pull/7525))
- Update PHP upgrade support to version 8.5 ([#7644](https://github.com/rectorphp/rector-src/pull/7644)), Thanks @guilheb!
- [stmts-aware] Deprecate `StmtsAwareInterface` interface and replace with meta-type + groups ([#7679](https://github.com/rectorphp/rector-src/pull/7679)) - [How to upgrade?](https://github.com/rectorphp/rector-src/pull/7679)
- <br>
🐛 Bugfixes :bug:
- Improve parent call fixture in Php4ConstructorRector not to use KEY constant ([#7642](https://github.com/rectorphp/rector-src/pull/7642))
- Improve ClassPropertyAssignToConstructorPromotionRector not to use STMT_KEY attribute value ([#7645](https://github.com/rectorphp/rector-src/pull/7645))
- [TypeDeclaration] Handle crash on combine union types on AddClosureParamTypeForArrayReduceRector ([#7636](https://github.com/rectorphp/rector-src/pull/7636))
- [TypeDeclaration] Skip no key generic object return on NarrowObjectReturnTypeRector ([#7623](https://github.com/rectorphp/rector-src/pull/7623))
- [CodingStyle] Do not use FullyQualified on "self" on `ClosureFromCallableToFirstClassCallableRector` ([#7632](https://github.com/rectorphp/rector-src/pull/7632)), Thanks @devnix!
- [Php80] Handle mix still annotation and already attribute on AnnotationToAttributeRector ([#7639](https://github.com/rectorphp/rector-src/pull/7639)), Thanks @acoulton!
- cleanup RemoveUnsuedPrivateMethodRector ([#7643](https://github.com/rectorphp/rector-src/pull/7643))
- re-index changed nodes only ([#7651](https://github.com/rectorphp/rector-src/pull/7651))
- + 15 more
🗑️ Removed :skull:
- [DeadCode] Skip used from property fetch reference on loop on RemoveUnusedVariableAssignRector ([#7635](https://github.com/rectorphp/rector-src/pull/7635))
- [internal] Extract ImmutableNodeTraverser from vendor, to remove patch and keep using cache for node types ([#7634](https://github.com/rectorphp/rector-src/pull/7634))
- Deprecated STMT_KEY and remove its set attribute value ([#7647](https://github.com/rectorphp/rector-src/pull/7647))
- [attribute] Remove unused AttributeKey::REPRINT_RAW_VALUE ([#7664](https://github.com/rectorphp/rector-src/pull/7664))
- <br>
- ---
- <br>
📦 rectorphp/rector-symfony :musical_note:
- [stmts-aware] Use NodeGroup::STMTS_AWARE over StmtsAwareInterface ([#886](https://github.com/rectorphp/rector-symfony/pull/886))
- Fix rule when method is __invoke ([#884](https://github.com/rectorphp/rector-symfony/pull/884)), Thanks @wilfi00
- [CodeQuality] Do not replace variable assign on ControllerMethodInjectionToConstructorRector ([#883](https://github.com/rectorphp/rector-symfony/pull/883))
- Handle Doctrine constraints in ConstraintOptionsToNamedArgumentsRector ([#882](https://github.com/rectorphp/rector-symfony/pull/882)), Thanks @johndodev
- [CodeQuality] Skip FOS\RestBundle ParamFetcher on ControllerMethodInjectionToConstructorRector ([#881](https://github.com/rectorphp/rector-symfony/pull/881))
- [CodeQuality] Skip autowire() method via @required and Required attribute ([#880](https://github.com/rectorphp/rector-symfony/pull/880))
- Fix scoped \ cleared on single quote string on ControllerMethodInjectionToConstructorRector ([#879](https://github.com/rectorphp/rector-symfony/pull/879))
- [CodeQuality] Skip Common Entity contains subnamespaces on ControllerMethodInjectionToConstructorRector ([#878](https://github.com/rectorphp/rector-symfony/pull/878))
- + 12 more
📦 rectorphp/rector-phpunit :green_circle:
- [CodeQuality] Skip Generator on AssertCompareOnCountableWithMethodToAssertCountRector ([#591](https://github.com/rectorphp/rector-phpunit/pull/591))
- remove stmt key from ConstructClassMethodToSetUpTestCaseRector ([#590](https://github.com/rectorphp/rector-phpunit/pull/590))
- Remove stmt key from TestListenerToHooksRector ([#589](https://github.com/rectorphp/rector-phpunit/pull/589))
- fix phpunit covers default class with short covers methods ([#588](https://github.com/rectorphp/rector-phpunit/pull/588)), Thanks @irosner
- [CodeQuality] Do not use FullyQualified on "self" on WithCallbackIdenticalToStandaloneAssertsRector ([#587](https://github.com/rectorphp/rector-phpunit/pull/587))
- [phpunit 10] Improve PropertyExistsWithoutAssertRector coverage ([#586](https://github.com/rectorphp/rector-phpunit/pull/586))
- [depre] Deprecate AssertPropertyExistsRector as method was removed in PHPUnit 10 ([#585](https://github.com/rectorphp/rector-phpunit/pull/585))
- [depre] Deprecate RemoveDataProviderParamKeysRector as the keys can be useful to improve test readability ([#584](https://github.com/rectorphp/rector-phpunit/pull/584)), Thanks @MacDada
- + 1 more
✨ New Features :partying_face:
- [type-declaration] Add return data provider array type from strict test method param ([#7605](https://github.com/rectorphp/rector-src/pull/7605))
- [coding-style] Add NestedTernaryToMatchRector ([#7572](https://github.com/rectorphp/rector-src/pull/7572))
- [TypeDeclaration] Register NarrowObjectReturnTypeRector to type declaration set ([#7615](https://github.com/rectorphp/rector-src/pull/7615))
- <br>
🐛 Bugfixes :bug:
- [Diffs] Handle --no-diffs usage to show file have been changed if any with --dry-run + --no-diffs ([#7619](https://github.com/rectorphp/rector-src/pull/7619))
- [Php81] Skip callable variadic in array_all() on FunctionLikeToFirstClassCallableRector ([#7606](https://github.com/rectorphp/rector-src/pull/7606))
- fix a syntax error in the ArrayFirstLastRector rule documentation ([#7613](https://github.com/rectorphp/rector-src/pull/7613)), Thanks @esnard!
- Narrow object return type ([#7575](https://github.com/rectorphp/rector-src/pull/7575)), Thanks @Orest-Divintari!
- [type-declaration] Rename NarrowTooWideReturnType to NarrowWideUnionReturnTypeRector ([#7614](https://github.com/rectorphp/rector-src/pull/7614))
- [TypeDeclaration] Also update generic collection docblock on NarrowObjectReturnTypeRector ([#7616](https://github.com/rectorphp/rector-src/pull/7616))
- [TypeDeclaration] Do not change valid generic docblock on NarrowObjectReturnTypeRector ([#7617](https://github.com/rectorphp/rector-src/pull/7617))
- [Privatization] Do not remove readonly on promoted property on PrivatizeFinalClassPropertyRector ([#7611](https://github.com/rectorphp/rector-src/pull/7611))
- + 1 more
🗑️ Removed :skull:
- [dx] help - omit explicit command name as no longer needed; remove verbosity option, use debug instead ([#7620](https://github.com/rectorphp/rector-src/pull/7620))
- <br>
📦 rectorphp/rector-symfony :musical_note:
- ensure reset args after loop ([#864](https://github.com/rectorphp/rector-symfony/pull/864))
- Bump PHPStan to ^2.1.32 and fix test for InlineClassRoutePrefixRector ([#863](https://github.com/rectorphp/rector-symfony/pull/863))
- [Symfony74] replace PropertyMetadata deprecated functions ([#862](https://github.com/rectorphp/rector-symfony/pull/862)), Thanks @MrYamous
- [Symfony74] update WorkflowDumpCommand namespace ([#861](https://github.com/rectorphp/rector-symfony/pull/861)), Thanks @MrYamous
- add property support to ErrorNamesPropertyToConstantRector ([#860](https://github.com/rectorphp/rector-symfony/pull/860))
- Support converting all options to twig attributes ([#859](https://github.com/rectorphp/rector-symfony/pull/859)), Thanks @Spea
- <br>
📦 rectorphp/rector-phpunit :green_circle:
- [CodeQuality] Skip in static method on AssertFuncCallToPHPUnitAssertRector ([#582](https://github.com/rectorphp/rector-phpunit/pull/582))
- add implicit method call support ([#581](https://github.com/rectorphp/rector-phpunit/pull/581))
- add multi callbacks support ([#580](https://github.com/rectorphp/rector-phpunit/pull/580))
- allow extra stmt ([#579](https://github.com/rectorphp/rector-phpunit/pull/579))
- add dynamic instanceof support ([#578](https://github.com/rectorphp/rector-phpunit/pull/578))
- [code-quality] Add SimplerWithIsInstanceOfRector ([#577](https://github.com/rectorphp/rector-phpunit/pull/577))
- add sole instanceof support ([#576](https://github.com/rectorphp/rector-phpunit/pull/576))
- add use var ([#575](https://github.com/rectorphp/rector-phpunit/pull/575))
- + 8 more
📦 rectorphp/rector-downgrade-php :arrow_down:
- Bump to PHPStan ^2.1.32 and ignore false positive instanceof in OR usage ([#344](https://github.com/rectorphp/rector-downgrade-php/pull/344))
✨ New Features :partying_face:
- [type-declaration] Add ReturnIteratorInDataProviderRector ([#7593](https://github.com/rectorphp/rector-src/pull/7593))
- [type-declarations] Add TypedStaticPropertyInBehatContextRector ([#7596](https://github.com/rectorphp/rector-src/pull/7596))
- [DeadCode] Register RemoveNullArgOnNullDefaultParamRector to dead code set ([#7597](https://github.com/rectorphp/rector-src/pull/7597))
- [php 8.5] Split of nested functions calls to pipe operator in a new standalone rule ([#7603](https://github.com/rectorphp/rector-src/pull/7603))
- <br>
🐛 Bugfixes :bug:
- always add nullable on TypedPropertyFromJMSSerializerAttributeTypeRector as serializer does not use constructor ([#7599](https://github.com/rectorphp/rector-src/pull/7599))
- [Php81] Skip callable param union on FunctionLikeToFirstClassCallableRector ([#7589](https://github.com/rectorphp/rector-src/pull/7589))
- [CodeQuality] Skip ArrayDimFetch with BitwiseXor on CombinedAssignRector ([#7590](https://github.com/rectorphp/rector-src/pull/7590))
- [Php84] Skip variable extraction with return early on ForeachToArrayAllRector ([#7591](https://github.com/rectorphp/rector-src/pull/7591))
- [PHP 8.5] rename NestedToPipeOeratorRector to SequentialAssignmentsToPipeOperatorRector, handle only assigns, not nested calls ([#7588](https://github.com/rectorphp/rector-src/pull/7588))
- [Php81] Skip as Arg of non-native function call on FunctionLikeToFirstClassCallableRector ([#7592](https://github.com/rectorphp/rector-src/pull/7592))
- skip different args passed to call-like and required by arrow function in FunctionLikeToFirstClassCallableRector ([#7594](https://github.com/rectorphp/rector-src/pull/7594))
- handle public properties in TypedPropertyFromJMSSerializerAttributeTypeRector as nullable ([#7595](https://github.com/rectorphp/rector-src/pull/7595))
- + 5 more
📦 rectorphp/rector-symfony :musical_note:
- [Configs] Skip first class callable on RemoveConstructorAutowireServiceRector ([#858](https://github.com/rectorphp/rector-symfony/pull/858))
- <br>
📦 rectorphp/rector-phpunit :green_circle:
- [depre] Deprecate SetUpBeforeClassToSetUpRector as can break code easily ([#567](https://github.com/rectorphp/rector-phpunit/pull/567))
✨ New Features :partying_face:
- [PHP 8.5] Add `NestedToPipeOperatorRector` ([#7577](https://github.com/rectorphp/rector-src/pull/7577))
- [code-quality] Add `DirnameDirConcatStringToDirectStringPathRector` ([#7552](https://github.com/rectorphp/rector-src/pull/7552))
- [dead-code] Add `RemoveNullArgOnNullDefaultParamRector` ([#7562](https://github.com/rectorphp/rector-src/pull/7562))
- register AddClosureParamTypeFromIterableMethodCallRector to type declaration set (https://github.com/rectorphp/rector-src/commit/4d78f41bf14585adc0a7897d246b502142159776)
- register AddParamArrayDocblockBasedOnCallableNativeFuncCallRector in type declaration docblocks (https://github.com/rectorphp/rector-src/commit/80f7db8a3b9a4ab34c6646c9d24f03e777cc20c7)
- <br>
🐛 Bugfixes :bug:
- Fix next catch missed variable rename in CatchExceptionNameMatchingTypeRector ([#7547](https://github.com/rectorphp/rector-src/pull/7547))
- [Php81] Fix first class callable should not have trailing comma on FunctionLikeToFirstClassCallableRector ([#7551](https://github.com/rectorphp/rector-src/pull/7551))
- [CodingStyle] Skip Method target not found or defined only via @method on FunctionLikeToFirstClassCallableRector ([#7553](https://github.com/rectorphp/rector-src/pull/7553))
- [Php81][CodingStyle] Allow both exists in both @method and native method on FunctionLikeToFirstClassCallableRector ([#7559](https://github.com/rectorphp/rector-src/pull/7559))
- [Php81][CodingStyle] Skip param used as invokable function multi args on FunctionLikeToFirstClassCallableRector ([#7563](https://github.com/rectorphp/rector-src/pull/7563))
- [Php81][CodingStyle] Skip Closure/ArrowFunction as assign expr on FunctionLikeToFirstClassCallableRector ([#7564](https://github.com/rectorphp/rector-src/pull/7564))
- finalize rules as well ([#7575](https://github.com/rectorphp/rector-src/pull/7575)), Thanks @Orest-Divintari!
- [Php85] Clean up dynamic expr check on NestedToPipeOperatorRector ([#7578](https://github.com/rectorphp/rector-src/pull/7578))
- + 13 more
🗑️ Removed and Deprecated :skull:
- [depre] Deprecate ParentClassToTraitsRector as very narrow use case to be generic, create custom rule instead ([#7550](https://github.com/rectorphp/rector-src/pull/7550))
- [depre] Deprecate ReplaceParentCallByPropertyCallRector as not used since doctrine set service removed, not standalone rule ([#7554](https://github.com/rectorphp/rector-src/pull/7554))
- [depre] Deprecate MethodCallToNewRector as not used and based on assumptions ([#7555](https://github.com/rectorphp/rector-src/pull/7555))
- [depre] Deprecate MethodCallToPropertyFetchRector, as not practical/used and part of removed set ([#7556](https://github.com/rectorphp/rector-src/pull/7556))
- [depre] Deprecate MethodCallToPropertyFetchRector as not used and part of removed set ([#7557](https://github.com/rectorphp/rector-src/pull/7557))
- [depre] Deprecate PropertyFetchToMethodCallRector not used and as too generic, use custom rule instead ([#7558](https://github.com/rectorphp/rector-src/pull/7558))
- [depre] Deprecate PropertyAssignToMethodCallRector as too narrow use-case and never used ([#7561](https://github.com/rectorphp/rector-src/pull/7561))
- [depre] Deprecate ReturnTypeWillChangeRector as discourages from filling correct types, use type declaration set instead ([#7570](https://github.com/rectorphp/rector-src/pull/7570))
- + 5 more
📦 rectorphp/rector-symfony :musical_note:
- [Configs] Skip first class callable on RemoveConstructorAutowireServiceRector ([#858](https://github.com/rectorphp/rector-symfony/pull/858))
- [config] Add FromServicePublicToDefaultsPublicRector ([#857](https://github.com/rectorphp/rector-symfony/pull/857))
- cover 2nd arg class in RemoveConstructorAutowireServiceRector ([#856](https://github.com/rectorphp/rector-symfony/pull/856))
- [config] Add RemoveConstructorAutowireServiceRector ([#855](https://github.com/rectorphp/rector-symfony/pull/855))
- [Symfony73] Skip empty result of named arguments on ConstraintOptionsToNamedArgumentsRector ([#853](https://github.com/rectorphp/rector-symfony/pull/853))
- [depre] Deprecate StringExtensionToConfigBuilderRector as deprecated in Symfony 7.4 ([#854](https://github.com/rectorphp/rector-symfony/pull/854))
- <br>
📦 rectorphp/rector-phpunit :green_circle:
- [code-quality] Add DeclareStrictTypesTestsRector to code-quality test ([#566](https://github.com/rectorphp/rector-phpunit/pull/566))
- [depre] Deprecate AddParentSetupCallOnSetupRector as not generic to be automated, fill manually where needed ([#565](https://github.com/rectorphp/rector-phpunit/pull/565))
- [CodeQuality] Skip used inside static closure on AssertFuncCallToPHPUnitAssertRector ([#564](https://github.com/rectorphp/rector-phpunit/pull/564))
- register ReplaceAtMethodWithDesiredMatcherRector to code-quality ([#563](https://github.com/rectorphp/rector-phpunit/pull/563))
- [depre] Deprecate CreateMockToAnonymousClassRector as requires manual work, often value object setter can be better alternative ([#562](https://github.com/rectorphp/rector-phpunit/pull/562))
📦 Rules Registered in sets :partying_face:
- Couple long-existing rules were added to PHP 8.1, code quality and type declaration sets after optional community testing :heavy_check_mark:
- If you'll experience any undersired changes, let us know :+1:
- register AddClosureParamTypeForArrayMapRector in type declaration level (https://github.com/rectorphp/rector-src/commit/68bb0cca86e28df97a3bca15f0f85836b7b87ea4)
- register AddClosureParamTypeForArrayReduceRector to type declaration level (https://github.com/rectorphp/rector-src/commit/38ecb98e65a29d6a774f93013a32cf8d8d4e482e)
- improve description (https://github.com/rectorphp/rector-src/commit/1ae7187546914988d394830b60c96b2178e4c4ad)
- add FunctionFirstClassCallableRector to PHP 8.1 set (https://github.com/rectorphp/rector-src/commit/0e18562ee6196eb3196169dd51a6dffac479ec60)
- register ReplaceConstantBooleanNotRector in code-quality level (https://github.com/rectorphp/rector-src/commit/e1640694bab2d29289c295e7875294e857cc2d01)
- register ClosureFromCallableToFirstClassCallableRector to PHP 8.1 set (https://github.com/rectorphp/rector-src/commit/d229205e5dbdf68c15d44a373203217368603361)
- + 2 more
🐛 Bugfixes :bug:
- [fix] skip variadic param on ParamTypeByParentCallTypeRector ([#7532](https://github.com/rectorphp/rector-src/pull/7532))
- [Php81][CodingStyle] Skip multi params on FunctionLikeToFirstClassCallableRector ([#7537](https://github.com/rectorphp/rector-src/pull/7537))
- [Php81][CodingStyle] Skip callable param assign with signature multi params on FunctionLikeToFirstClassCallableRector ([#7538](https://github.com/rectorphp/rector-src/pull/7538))
- Fix NullToStrictStringFuncCallArgRector with probabilistic check for plural array passed to function where array allowed ([#7539](https://github.com/rectorphp/rector-src/pull/7539))
- [Php81][CodingStyle] Skip variadic not used on FunctionLikeToFirstClassCallableRector ([#7540](https://github.com/rectorphp/rector-src/pull/7540))
- [Php81] Keep nullable param on NewInInitializerRector ([#7545](https://github.com/rectorphp/rector-src/pull/7545))
- [php 8.1] skip nullable property without null default in NewInInitializerRector ([#7546](https://github.com/rectorphp/rector-src/pull/7546))
- <br>
🗑️ Removed and deprecated :skull:
- [depre] Deprecate 3 configurable-only, never used closure param rules as too specific ([#7541](https://github.com/rectorphp/rector-src/pull/7541))
- [depre] Deprecate RenameFunctionLikeParamWithinCallLikeArgRector as never used, too narrow and better suits custom project ([#7544](https://github.com/rectorphp/rector-src/pull/7544))
- [depre] Deprecate AddTypeFromResourceDocblockRector as breaks code and does not solve any real problem ([#7542](https://github.com/rectorphp/rector-src/pull/7542))
- [Php81] Completely remove AttributeGroupNewLiner ([#7536](https://github.com/rectorphp/rector-src/pull/7536))
- <br>
- ---
- <br>
📦 rectorphp/rector-phpunit :green_circle:
- [depre] Add never used AddCoversClassAttributeRector, as very opionated and requires very specific file location - use custom rule instead ([#561](https://github.com/rectorphp/rector-phpunit/pull/561))
- Fix implicit PHP and PHPUnit version in RequiresAnnotationWithValueToAttributeRector ([#560](https://github.com/rectorphp/rector-phpunit/pull/560))
- [code-quality] Add AssertArrayCastedObjectToAssertSameRector ([#559](https://github.com/rectorphp/rector-phpunit/pull/559))
✨ New Features :partying_face:
- [code-quality] Add RepeatedAndNotEqualToNotInArrayRector ([#7517](https://github.com/rectorphp/rector-src/pull/7517))
- [code-quality] Add ReplaceConstantBooleanNotRector ([#7527](https://github.com/rectorphp/rector-src/pull/7527))
- [code-quality] Add VariableConstFetchToClassConstFetchRector ([#7457](https://github.com/rectorphp/rector-src/pull/7457))
- [coding-style] Add BinaryOpStandaloneAssignsToDirectRector ([#7466](https://github.com/rectorphp/rector-src/pull/7466))
- <br>
🐛 Bugfixes :bug:
- Fix autoload preload on PHPUnit 12+ on global installation ([#7468](https://github.com/rectorphp/rector-src/pull/7468)) ([#7472](https://github.com/rectorphp/rector-src/pull/7472)) ([#7475](https://github.com/rectorphp/rector-src/pull/7475))
- [TypeDeclaration] Skip override from parent method on `AddParamStringTypeFromSprintfUseRector` ([#7479](https://github.com/rectorphp/rector-src/pull/7479))
- Run PHPUnit 12 and PHPStan compatibilty check ([#7455](https://github.com/rectorphp/rector-src/pull/7455))
- [TypeDeclarationDocblocks] Handle repeated item type on DocblockReturnArrayFromDirectArrayInstanceRector ([#7459](https://github.com/rectorphp/rector-src/pull/7459))
- [BetterPhpDocParser] Unique handling string on `BracketsAwareUnionTypeNode` ([#7462](https://github.com/rectorphp/rector-src/pull/7462))
- [CodeQuality] Skip non-variable fetch on `VariableConstFetchToClassConstFetchRector` as may cause side effect ([#7464](https://github.com/rectorphp/rector-src/pull/7464))
- [CodingStyle] Skip any CallLike with args !== [] on `BinaryOpStandaloneAssignsToDirectRector` ([#7469](https://github.com/rectorphp/rector-src/pull/7469))
- [CodingStyle] Skip compare binary op on BinaryOpStandaloneAssignsToDirectRector ([#7470](https://github.com/rectorphp/rector-src/pull/7470))
- + 2 more
🗑️ Removed and deprecated :skull:
- [deprecated] Deprecate `strict-types` rules as risky and not practical ([#7523](https://github.com/rectorphp/rector-src/pull/7523))
- [DeadCode] Skip vars exists in static vars on RemoveNonExistingVarAnnotationRector ([#7463](https://github.com/rectorphp/rector-src/pull/7463))
- [autoload] Remove PHPUnit version 12 check on preload.php load ([#7474](https://github.com/rectorphp/rector-src/pull/7474))
- [Removal] Remove --kaizen option, as it might jump right to risky rules, use levels instead ([#7478](https://github.com/rectorphp/rector-src/pull/7478))
📦 rectorphp/rector-phpunit
- Fix argument.type PHPStan errors ([#553](https://github.com/rectorphp/rector-phpunit/pull/553)), Thanks @staabm
✨ New Features :partying_face:
- [code-quality] Add `VariableConstFetchToClassConstFetchRector` ([#7457](https://github.com/rectorphp/rector-src/pull/7457))
- [coding-style] Add `BinaryOpStandaloneAssignsToDirectRector` ([#7466](https://github.com/rectorphp/rector-src/pull/7466))
- [type-declaration] Add `AddParamStringTypeFromSprintfUseRector` ([#7477](https://github.com/rectorphp/rector-src/pull/7477))
- <br>
🐛 Bugfixes :bug:
- [TypeDeclaration] Skip override from parent method on AddParamStringTypeFromSprintfUseRector ([#7479](https://github.com/rectorphp/rector-src/pull/7479))
- [ci] Run PHPUnit 12 and PHPStan compatibilty check ([#7455](https://github.com/rectorphp/rector-src/pull/7455))
- [TypeDeclarationDocblocks] Handle repeated item type on DocblockReturnArrayFromDirectArrayInstanceRector ([#7459](https://github.com/rectorphp/rector-src/pull/7459))
- [BetterPhpDocParser] Unique handling string on BracketsAwareUnionTypeNode ([#7462](https://github.com/rectorphp/rector-src/pull/7462))
- [CodeQuality] Skip non-variable fetch on VariableConstFetchToClassConstFetchRector as may cause side effect ([#7464](https://github.com/rectorphp/rector-src/pull/7464))
- Fix autoload preload on PHPUnit 12+ on global installation ([#7468](https://github.com/rectorphp/rector-src/pull/7468))
- [DeadCode] Skip vars exists in static vars on RemoveNonExistingVarAnnotationRector ([#7463](https://github.com/rectorphp/rector-src/pull/7463))
- <br>
🗑️ Removed :skull:
- [removal] Remove --kaizen option, as it might jump right to risky rules, use levels instead ([#7478](https://github.com/rectorphp/rector-src/pull/7478))
- remove @experimental from level classes, as used (https://github.com/rectorphp/rector-src/commit/3ff3caa7d71385a8f6d2c282677e570683b202c6)
✨ New Features :partying_face:
- [tdd] Add `AddParamArrayDocblockBasedOnArrayMapRector` ([#7435](https://github.com/rectorphp/rector-src/pull/7435))
- [Php85] Add `ShellExecFunctionCallOverBackticksRector` ([#7445](https://github.com/rectorphp/rector-src/pull/7445))
- <br>
🐛 Bugfixes :bug:
- [Scoped] Load early preload.php on scoped bootstrap.php on phpunit 12+ running ([#7451](https://github.com/rectorphp/rector-src/pull/7451))
- [autoload] Fix phpstan + rector tests co-run to avoid duplicated php-parser loading error ([#7440](https://github.com/rectorphp/rector-src/pull/7440))
- [Php80] Skip inside by ref method on ChangeSwitchToMatchRector ([#7443](https://github.com/rectorphp/rector-src/pull/7443))
- [Renaming] Allow self/static on RenamePropertyRector ([#7444](https://github.com/rectorphp/rector-src/pull/7444))
- Directly check type of substr() on RecastingRemovalRector ([#7446](https://github.com/rectorphp/rector-src/pull/7446))
- [fix] Skip symfony config closures on FirstClassCallableRector as they do not support first class callables ([#7447](https://github.com/rectorphp/rector-src/pull/7447))
- [DeadCode] Skip ClassLikeNameClassNameImportSkipVoter for RecastingRemovalRector ([#7448](https://github.com/rectorphp/rector-src/pull/7448))
- [dead-code] Skip substr casting removal on PHP 7.x, as can return false|string ([#7449](https://github.com/rectorphp/rector-src/pull/7449))
- + 2 more
🐛 Bugfixes :bug:
- Fix php 7.4 regression on strtolower to false on ClassLikeNameClassNameImportSkipVoter ([#7436](https://github.com/rectorphp/rector-src/pull/7436))
- [CodeQuality] Handle property fetch and common nodes crash on InlineArrayReturnAssignRector ([#7437](https://github.com/rectorphp/rector-src/pull/7437))
