diff --git a/Annotation/Loader.php b/Annotation/Loader.php index c8f77a08..d698a310 100644 --- a/Annotation/Loader.php +++ b/Annotation/Loader.php @@ -138,9 +138,7 @@ class Loader extends BaseObject return; } $replace = $this->getReflect($path, $namespace); - if (empty($replace) || count($replace->getAttributes(Target::class)) < 1) { - return; - } + $this->appendFileToDirectory($path->getRealPath(), $replace->getName()); static::$_classes[] = $replace->getName(); @@ -177,6 +175,7 @@ class Loader extends BaseObject if (!str_starts_with($key, $path)) { continue; } + unset(static::$_directory[$key]); foreach ($_path as $item) { $paths[$key] = $item; } diff --git a/HttpServer/Route/Router.php b/HttpServer/Route/Router.php index 8a785ad5..6daca769 100644 --- a/HttpServer/Route/Router.php +++ b/HttpServer/Route/Router.php @@ -641,9 +641,6 @@ class Router extends HttpService implements RouterInterface continue; } foreach ($attribute as $item) { - if ($item instanceof Route) { - var_dump($item->uri . '::' . $item->method); - } $item->execute($instance, $method); } }