Skip to content

[Arguments] Fill existing param in place on ArgumentAdderRector to keep attributes and type - #9170

Merged
TomasVotruba merged 1 commit into
mainfrom
fix-argument-adder-keep-existing-param
Dec 4, 2026
Merged

TomasVotruba merged 1 commit into
mainfrom
fix-argument-adder-keep-existing-param

Conversation

@TomasVotruba

@TomasVotruba TomasVotruba commented Dec 4, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #9169, fixing the root cause.

ArgumentAdderRector::addClassMethodParam() replaced an existing param with a new Param. This dropped attributes (#[\SensitiveParameter]), by-ref/variadic/promotion flags, and reprinted the type as FQN.

Now an existing param is filled in place - only missing type or default is added. A param that already has both is left untouched, so the extra skip check from #9169 is not needed anymore.

Fixtures:

@TomasVotruba
TomasVotruba force-pushed the fix-argument-adder-keep-existing-param branch from 693c7b0 to a418267 Compare December 4, 2026 21:08
@TomasVotruba
TomasVotruba merged commit 7c473ea into main Dec 4, 2026
52 checks passed
@TomasVotruba
TomasVotruba deleted the fix-argument-adder-keep-existing-param branch December 4, 2026 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant