From f1e462c7bf10083eeb50eeccfd06a6057fcbb9c7 Mon Sep 17 00:00:00 2001 From: Divine Niiquaye Ibok Date: Mon, 30 Aug 2021 05:32:46 +0000 Subject: [PATCH] Fixed issue with duplicated annotation class --- src/AnnotationLoader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AnnotationLoader.php b/src/AnnotationLoader.php index bd1c309..6dd7604 100644 --- a/src/AnnotationLoader.php +++ b/src/AnnotationLoader.php @@ -99,7 +99,7 @@ public function build(?string ...$annotationClass): void } } - foreach ((array) $annotationClass as $annotation) { + foreach (\array_unique((array) $annotationClass) as $annotation) { $loadedAnnotation = \array_filter($annotations[$annotation] ?? []); if (isset($this->listeners[$annotation])) {