Skip to content

Commit 8321cc2

Browse files
committed
修正controllers配置不生效问题
1 parent 8326c8c commit 8321cc2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/parseApi/ParseAnnotation.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,8 @@ protected function getConfigControllers(string $path): array
9292
$configControllers = $config['controllers'];
9393
if (!empty($configControllers) && count($configControllers) > 0) {
9494
foreach ($configControllers as $item) {
95-
$itemPath = $item;
96-
$class = $path . '\\' . $itemPath;
97-
if (class_exists($class)) {
98-
$controllers[] = $class;
95+
if ( strpos($item, $path) !== false && class_exists($item)) {
96+
$controllers[] = $item;
9997
}
10098
}
10199
}

0 commit comments

Comments
 (0)