-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
SuiteInitSubscriberTrait incorrectly appends 'receiveModuleContainer' listener #6861
Copy link
Copy link
Closed
Description
Hi
The SuiteInitSubscrtiberTrait was introduced recently in:
But it incorrectly appends the listener so that any extension listening suite.init causes:
[26-May-2025 06:38:58 UTC] PHP Fatal error: Uncaught TypeError: Symfony\Component\EventDispatcher\EventDispatcher::addListener(): Argument #3 ($priority) must be of type int, string given, called in /data/vendor/symfony/event-dispatcher/EventDispatcher.php on line 178 and defined in /data/vendor/symfony/event-dispatcher/EventDispatcher.php:129
This is because Symfony expects one of:
'suite.init' => 'methodName',
'suite.init' => [
'methodName'
]
'suite.init' => [
['methodName', 10], // listener priorirty
]
The new code assumes 2 but appends and appends to the array:
'suite.init' => [
'methodName',
'receiveModuleContainer',
],
And Symfony tries to use receiveModuleContainer as a priotity (as with 3) causing the error above. Currently there is no way to listen on suite.init.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels