| @@ 327-333 (lines=7) @@ | ||
| 324 | private function dispatch(Event $event, $eventName) |
|
| 325 | { |
|
| 326 | // LegacyEventDispatcherProxy exists in Symfony >= 4.3 |
|
| 327 | if (class_exists(LegacyEventDispatcherProxy::class)) { |
|
| 328 | // New Symfony 4.3 EventDispatcher signature |
|
| 329 | $this->getEventDispatcher()->dispatch($event, $eventName); |
|
| 330 | } else { |
|
| 331 | // Old EventDispatcher signature |
|
| 332 | $this->getEventDispatcher()->dispatch($eventName, $event); |
|
| 333 | } |
|
| 334 | } |
|
| 335 | } |
|
| 336 | ||
| @@ 150-156 (lines=7) @@ | ||
| 147 | $event = new CacheEvent($this, $request, $response, $requestType); |
|
| 148 | ||
| 149 | // LegacyEventDispatcherProxy exists in Symfony >= 4.3 |
|
| 150 | if (class_exists(LegacyEventDispatcherProxy::class)) { |
|
| 151 | // New Symfony 4.3 EventDispatcher signature |
|
| 152 | $this->getEventDispatcher()->dispatch($event, $name); |
|
| 153 | } else { |
|
| 154 | // Old EventDispatcher signature |
|
| 155 | $this->getEventDispatcher()->dispatch($name, $event); |
|
| 156 | } |
|
| 157 | ||
| 158 | $response = $event->getResponse(); |
|
| 159 | } |
|