Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit eb1971b

Browse filesBrowse files
minor #42483 [EventDispatcher] fix getSubscribedEvents() event yielding instead or returning array (nicolas-grekas)
This PR was merged into the 5.4 branch. Discussion ---------- [EventDispatcher] fix getSubscribedEvents() event yielding instead or returning array | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - `EventSubscriberInterface::getSubscribedEvents()` is described as returning an `array`. Yielding here is breaking the contracts. Commits ------- f18231a [EventDispatcher] fix getSubscribedEvents() event yielding instead or returning array
2 parents 1d19615 + f18231a commit eb1971b
Copy full SHA for eb1971b

File tree

Expand file treeCollapse file tree

1 file changed

+4
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-2
lines changed

‎src/Symfony/Bridge/Doctrine/Messenger/DoctrineClearEntityManagerWorkerSubscriber.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Doctrine/Messenger/DoctrineClearEntityManagerWorkerSubscriber.php
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@ public function onWorkerMessageFailed()
4242

4343
public static function getSubscribedEvents()
4444
{
45-
yield WorkerMessageHandledEvent::class => 'onWorkerMessageHandled';
46-
yield WorkerMessageFailedEvent::class => 'onWorkerMessageFailed';
45+
return [
46+
WorkerMessageHandledEvent::class => 'onWorkerMessageHandled',
47+
WorkerMessageFailedEvent::class => 'onWorkerMessageFailed',
48+
];
4749
}
4850

4951
private function clearEntityManagers()

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.