Skip to content

Commit 56f3a1e

Browse files
committed
Ensure listeners work with v2 and v3 versions of zend-eventmanager
- Added `$priority = 1` optional argument defined in v3 to `attach()` signatures.
1 parent 0191696 commit 56f3a1e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Listener/ApiProblemListener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ public function __construct($filters = null)
5858
}
5959

6060
/**
61-
* @param EventManagerInterface $events
61+
* {@inheritDoc}
6262
*/
63-
public function attach(EventManagerInterface $events)
63+
public function attach(EventManagerInterface $events, $priority = 1)
6464
{
6565
$this->listeners[] = $events->attach(MvcEvent::EVENT_RENDER, [$this, 'onRender'], 1000);
6666
$this->listeners[] = $events->attach(MvcEvent::EVENT_DISPATCH_ERROR, [$this, 'onDispatchError'], 100);

src/Listener/RenderErrorListener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ class RenderErrorListener extends AbstractListenerAggregate
2424
protected $displayExceptions = false;
2525

2626
/**
27-
* @param EventManagerInterface $events
27+
* {@inheritDoc}
2828
*/
29-
public function attach(EventManagerInterface $events)
29+
public function attach(EventManagerInterface $events, $priority = 1)
3030
{
3131
$this->listeners[] = $events->attach(MvcEvent::EVENT_RENDER_ERROR, [$this, 'onRenderError'], 100);
3232
}

0 commit comments

Comments
 (0)