Skip to content

[Symfony61] Do not report CommandConfigureToAttributeRector change when nothing is extracted - #1068

Merged
TomasVotruba merged 1 commit into
rectorphp:mainfrom
GErpeldinger:fix-command-configure-to-attribute-has-changed
Sep 22, 2026
Merged

TomasVotruba merged 1 commit into
rectorphp:mainfrom
GErpeldinger:fix-command-configure-to-attribute-has-changed

Conversation

@GErpeldinger

Copy link
Copy Markdown
Contributor

Fixes rectorphp/rector#9910

$hasChanged was true as soon as the existing #[AsCommand] had arguments, even when nothing was taken from configure(). It is now true only when a call is removed from configure().

Without the fix, the new skip fixture prints "File not changed but some Rector rules applied: CommandConfigureToAttributeRector".

🤖 Drafted with AI assistance.

@TomasVotruba

Copy link
Copy Markdown
Member

CI needs fix first

@GErpeldinger

GErpeldinger commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor Author

Error was not mine, but a bump of symplify/phpstan-rules, i opened another PR (#1069), i can rebase this branch when merged

@TomasVotruba

TomasVotruba commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

Next time, you can include it here. To keep it simple

@GErpeldinger
GErpeldinger force-pushed the fix-command-configure-to-attribute-has-changed branch from d508879 to 976dee2 Compare September 22, 2026 22:21
@GErpeldinger

Copy link
Copy Markdown
Contributor Author

Ok thanks for the info, branch is rebase and ready 🚀

@TomasVotruba
TomasVotruba merged commit 79f93e0 into rectorphp:main Sep 22, 2026
8 checks passed
@TomasVotruba

Copy link
Copy Markdown
Member

Thanks 👍

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.

CommandConfigureToAttributeRector reports a change on a command it does not modify

2 participants