Skip to content

Skip CommandMustHaveAsCommandAttributeRule when symfony/console not in require - #381

Merged
TomasVotruba merged 1 commit into
mainfrom
skip-as-command-without-symfony-console-require
Oct 23, 2026
Merged

TomasVotruba merged 1 commit into
mainfrom
skip-as-command-without-symfony-console-require

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Skips the #[AsCommand] rule unless symfony/console is a direct require dependency. A require-dev only entry (or no entry) no longer triggers the rule, so projects that pull Symfony Console transitively or only for dev are left alone.

  • new ComposerRequireResolver reads the project composer.json require section
  • rule returns early when symfony/console is missing from require
  • unit test for the resolver (require vs require-dev vs absent vs missing file)

@TomasVotruba
TomasVotruba force-pushed the skip-as-command-without-symfony-console-require branch from 6d28c64 to dd39006 Compare October 23, 2026 10:09
@TomasVotruba
TomasVotruba merged commit 8ffdf72 into main Oct 23, 2026
9 checks passed
@TomasVotruba
TomasVotruba deleted the skip-as-command-without-symfony-console-require branch October 23, 2026 10:15
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