mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-03-18 13:14:52 +08:00
fix init command compatibility
This commit is contained in:
parent
e5463fc15a
commit
c56ba22476
@ -125,7 +125,7 @@ class InitCommand extends Command
|
||||
$files = [];
|
||||
foreach ($patterns as $pattern) {
|
||||
// TODO: 优化代码,避免在循环中使用 array_merge 以减少资源消耗
|
||||
$files = array_merge($files, glob($this->getVendorPath($pattern), GLOB_BRACE));
|
||||
$files = array_merge($files, glob($this->getVendorPath($pattern)));
|
||||
}
|
||||
return array_map(fn ($file) => str_replace($this->getVendorPath(''), '', $file), $files);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user