Skip to content

Commit

Permalink
EventManager: compatibility with new Doctrine (#73)
Browse files Browse the repository at this point in the history
 New Doctrine is using getAllListeners() instead of getListeners() without argument
  • Loading branch information
thorewi committed Dec 14, 2022
1 parent 4ccb4e2 commit c1bcc4b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Events/ContainerAwareEventManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ public function getListeners($event = null): array

return $stack;
}

/**
* @return object[]|object[][]
*/
public function getAllListeners(): array
{
return $this->getListeners();
}

/**
* @return object[]
Expand Down
8 changes: 8 additions & 0 deletions src/Events/DebugEventManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ public function getListeners($event = null): array
{
return $this->inner->getListeners($event);
}

/**
* @return object[]|object[][]
*/
public function getAllListeners(): array
{
return $this->getListeners();
}

/**
* @phpcsSuppress SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingParameterTypeHint
Expand Down

0 comments on commit c1bcc4b

Please sign in to comment.