From 70e945ce86b6c382963afcc1d63193f9497f16cd Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Sat, 24 Apr 2021 20:48:59 +0800 Subject: [PATCH] modify --- Annotation/Loader.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Annotation/Loader.php b/Annotation/Loader.php index 19e8de93..67d57f7e 100644 --- a/Annotation/Loader.php +++ b/Annotation/Loader.php @@ -173,7 +173,9 @@ class Loader extends BaseObject if ($path->getExtension() !== 'php') { return; } - + if (str_starts_with($path->getRealPath(), __DIR__)) { + return; + } $replace = Snowflake::getDi()->getReflect($this->explodeFileName($path, $namespace)); if (empty($replace) || count($replace->getAttributes(Target::class)) < 1) { return;