Skip to content

[Deprecation] Deprecate ParameterBagToAutowireAttributeRector#954

Merged
TomasVotruba merged 2 commits into
mainfrom
tv-deprecate-parameter-bag-autowire
Jun 28, 2026
Merged

[Deprecation] Deprecate ParameterBagToAutowireAttributeRector#954
TomasVotruba merged 2 commits into
mainfrom
tv-deprecate-parameter-bag-autowire

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

The ParameterBagToAutowireAttributeRector is too specific and opinionated to maintain as a generic rule. The naming convention (snake_case param → camelCase var) and the decision to swap ParameterBagInterface for #[Autowire(param:)] are project-specific choices that better belong in a custom rule.

This marks the rule as deprecated via DeprecatedInterface, so users get a runtime warning before it is removed:

  • implements DeprecatedInterface → Rector reports "rule is deprecated and will be removed"
  • adds @deprecated docblock pointing users to write a custom rule for their own ParameterBag → #[Autowire] convention

Not referenced in any set config, so no set changes needed.

@TomasVotruba TomasVotruba changed the title Deprecate ParameterBagToAutowireAttributeRector [Deprecation] Deprecate ParameterBagToAutowireAttributeRector Jun 28, 2026
@TomasVotruba TomasVotruba merged commit e944500 into main Jun 28, 2026
8 checks passed
@TomasVotruba TomasVotruba deleted the tv-deprecate-parameter-bag-autowire branch June 28, 2026 14:29
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