Skip to content

Drop default priority 0 in EventSubscriberToAttributeRector - #1100

Merged
TomasVotruba merged 1 commit into
mainfrom
strip-default-priority-zero-as-event-listener
Oct 29, 2026
Merged

TomasVotruba merged 1 commit into
mainfrom
strip-default-priority-zero-as-event-listener

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

When getSubscribedEvents() registers a listener with an explicit priority of 0, the generated #[AsEventListener] attribute now omits the priority argument. 0 is the Symfony default, so emitting priority: 0 adds noise without changing behavior.

Also confirmed: when no priority is present in the original, no priority argument is added - that was already the case.

Added fixture drop_default_priority.php.inc.

@TomasVotruba
TomasVotruba merged commit addeacd into main Oct 29, 2026
8 checks passed
@TomasVotruba
TomasVotruba deleted the strip-default-priority-zero-as-event-listener branch October 29, 2026 06:37
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