Repository navigation
#238 - Event listeners declared with explicit kernel.event_listener tags (new EventSubscriberToAttributeRector rule) - #239
Merged
Merged
Conversation
…ags instead of event subscribers (new EventSubscriberToAttributeRector rule) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e only, the number of minutes is computed by Symfony Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closed
1 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #238, fixes #235.
The weekly Quality build fails since 2026-11-02: the new
EventSubscriberToAttributeRectorrule wants#[AsEventListener]attributes instead ofEventSubscriberInterface. The attributes need autoconfiguration, which the bundle does not use (Symfony best practices for bundles, checked bytestServicesAreDefinedExplicitly).ProcessEventSubscriber,UploadedFileSubscriberandProcessExecutionNotifierno longer implementEventSubscriberInterface: their listeners are declared withkernel.event_listenertags inconfig/services/.Same events, methods and priorities, except
flushDoctrineLogs: priority 101 instead of 100, so that it still runs beforesuccess()/fail()(before, the order came from thegetSubscribedEvents()array; with tags, from the tag order). The logs are still saved before the end of the process execution.Unused event arguments removed by Rector (
flushDoctrineLogs(),onMessageHandled()).Tests: the
getSubscribedEvents()tests are replaced by a test of the tags (CleverAgeUiProcessExtensionTest::testEventListeners); the tests dispatching events register the listeners withaddListener().Also includes the commit of #235 - LoginThrottlingTest: do not assert the number of minutes of the throttling message #236 (LoginThrottlingTest fails with the latest Symfony versions (weekly build) #235:
LoginThrottlingTestno longer asserts the number of minutes computed by Symfony), which fails without the Rector fix: each PR needed the other to pass the required checks.Quality and tests only: no CHANGELOG entry.
Requirements
Breaking changes
ProcessEventSubscriberandUploadedFileSubscriberare internal.ProcessExecutionNotifieris final and no longer anEventSubscriberInterface(nogetSubscribedEvents()): only code calling this method or registering the class as a subscriber itself is concerned.🤖 Generated with Claude Code