Skip to content

[symfony] remove PreferAutowireAttributeOverConfigParamRule, too opinionated - #303

Merged
TomasVotruba merged 1 commit into
mainfrom
remove-prefer-autowire-attribute-over-config-param
Sep 23, 2026
Merged

TomasVotruba merged 1 commit into
mainfrom
remove-prefer-autowire-attribute-over-config-param

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Removes symfony.preferAutowireAttributeOverConfigParam rule.

The rule pushed #[Autowire(param: ...)] in-class attributes over param() references in config. This is very opinionated - config-based parameter injection is a valid, often preferable choice, so the rule does not always point to the better option.

Removed:

  • rule + its identifier constant
  • config registration in symfony-config-rules.neon
  • tests + fixtures
  • README section
  • now-unused SymfonyClass::ATTRIBUTE and SymfonyFunctionName::PARAM constants

@TomasVotruba
TomasVotruba merged commit 091432d into main Sep 23, 2026
8 checks passed
@TomasVotruba
TomasVotruba deleted the remove-prefer-autowire-attribute-over-config-param branch September 23, 2026 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant