From 42aac802dd67ea3bd17fb6652239c7a2411e352e Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Tue, 29 Mar 2022 02:09:00 +0800 Subject: [PATCH] Fix exclude-annotation-path not working bug --- src/ZM/Event/SwooleEvent/OnWorkerStart.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ZM/Event/SwooleEvent/OnWorkerStart.php b/src/ZM/Event/SwooleEvent/OnWorkerStart.php index e38a529b..c0c4f7e9 100644 --- a/src/ZM/Event/SwooleEvent/OnWorkerStart.php +++ b/src/ZM/Event/SwooleEvent/OnWorkerStart.php @@ -161,7 +161,7 @@ class OnWorkerStart implements SwooleEvent $exclude_annotations = array_merge($composer['extra']['exclude_annotate'] ?? [], $composer['extra']['zm']['exclude-annotation-path'] ?? []); foreach ($merge as $k => $v) { if (is_dir(DataProvider::getSourceRootDir() . '/' . $v)) { - if (in_array(trim($k, '\\') . '\\', $exclude_annotations)) { + if (in_array($v, $exclude_annotations)) { continue; } if (trim($k, '\\') == 'ZM') {