[DI][EventDispatcher] added contract for implementation

fixes #36708.
This commit is contained in:
Matthias Derer 2020-05-05 17:01:20 +02:00
parent a8b5b15c25
commit 88e43d4d4c
1 changed files with 3 additions and 0 deletions

View File

@ -40,6 +40,9 @@ interface EventSubscriberInterface
* * ['eventName' => ['methodName', $priority]]
* * ['eventName' => [['methodName1', $priority], ['methodName2']]]
*
* The code must not depend on runtime state as it will only be called at compile time.
* All logic depending on runtime state must be put into the individual methods handling the events.
*
* @return array The event names to listen to
*/
public static function getSubscribedEvents();