mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-12-02 11:48:08 +08:00
Fixed hyperf components are not scaned.
This commit is contained in:
parent
22c9a0f417
commit
46da63979c
@ -32,7 +32,7 @@ class ClassLoader
|
||||
$paths = array_merge([
|
||||
// @TODO 优化 app 路径为可配置的
|
||||
BASE_PATH . '/app',
|
||||
], $consfigs['annotations']['scan']['paths'] ?? []);
|
||||
], $configs['annotations']['scan']['paths'] ?? []);
|
||||
$classes = $scanner->scan($paths);
|
||||
$this->proxies = ProxyManager::init($classes);
|
||||
var_dump($this->proxies);
|
||||
@ -96,4 +96,4 @@ class ClassLoader
|
||||
return $this->composerLoader;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -30,9 +30,9 @@ class Scanner
|
||||
public function __construct(\Hyperf\Autoload\ClassLoader $classloader, array $ignoreAnnotations = [])
|
||||
{
|
||||
$this->classloader = $classloader;
|
||||
AnnotationRegistry::registerLoader(function ($class) {
|
||||
return class_exists($class, false);
|
||||
});
|
||||
// AnnotationRegistry::registerLoader(function ($class) {
|
||||
// return class_exists($class, false);
|
||||
// });
|
||||
|
||||
foreach ($ignoreAnnotations as $annotation) {
|
||||
AnnotationReader::addGlobalIgnoredName($annotation);
|
||||
@ -112,4 +112,4 @@ class Scanner
|
||||
return $result;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user