mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-21 15:45:36 +08:00
fix unpack autoload not working, change exclude_annotate to another name (build 444)
This commit is contained in:
@@ -156,9 +156,10 @@ class OnWorkerStart implements SwooleEvent
|
||||
$parser = new AnnotationParser();
|
||||
$composer = json_decode(file_get_contents(DataProvider::getSourceRootDir() . '/composer.json'), true);
|
||||
$merge = array_merge($composer['autoload']['psr-4'] ?? [], $composer['autoload-dev']['psr-4'] ?? []);
|
||||
$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, '\\') . '\\', $composer['extra']['exclude_annotate'] ?? [])) {
|
||||
if (in_array(trim($k, '\\') . '\\', $exclude_annotations)) {
|
||||
continue;
|
||||
}
|
||||
if (trim($k, '\\') == 'ZM') {
|
||||
|
||||
Reference in New Issue
Block a user