From 3daddf42c36124d853761d43322ff52c338cd3ce Mon Sep 17 00:00:00 2001 From: Antonio Pauletich Date: Mon, 20 Feb 2023 12:59:16 +0100 Subject: [PATCH] Allow Doctrine Event manager v2 --- composer.json | 2 +- tests/BaseTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index a03499ac..772060ce 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "doctrine/collections": "^1.6", "doctrine/common": "^3.1", "doctrine/dbal": "^2.13 || ^3.0", - "doctrine/event-manager": "^1.1", + "doctrine/event-manager": "^1.2 || ^2.0", "doctrine/orm": "^2.10", "doctrine/persistence": "^2.2 || ^3.0", "psr/clock": "^1.0", diff --git a/tests/BaseTest.php b/tests/BaseTest.php index 7136d5a9..bd85193f 100644 --- a/tests/BaseTest.php +++ b/tests/BaseTest.php @@ -114,7 +114,7 @@ protected function getEntityManager(): EntityManager // get rid of more global state $evm = $connection->getEventManager(); - foreach ($evm->getListeners() as $event => $listeners) { + foreach ($evm->getAllListeners() as $event => $listeners) { foreach ($listeners as $listener) { $evm->removeEventListener([$event], $listener); }