Skip to content

Check #[AsCommand] attribute class is loadable first in CommandMustHaveAsCommandAttributeRule - #382

Merged
TomasVotruba merged 1 commit into
mainfrom
attribute-class-exists-check-first
Oct 23, 2026
Merged

TomasVotruba merged 1 commit into
mainfrom
attribute-class-exists-check-first

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Move the reflection check for the #[AsCommand] attribute class to the front of processNode(), right after the anonymous-class guard.

If the project does not have the Symfony #[AsCommand] attribute class loadable by the reflection provider, the rule can bail out immediately, before resolving composer requirements, the Laravel class, the class name or its parentage.

@TomasVotruba
TomasVotruba merged commit 27ae408 into main Oct 23, 2026
9 checks passed
@TomasVotruba
TomasVotruba deleted the attribute-class-exists-check-first branch October 23, 2026 10:23
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