diff --git a/plugin/think-library/src/extend/PhinxExtend.php b/plugin/think-library/src/extend/PhinxExtend.php index 344740f31..8f6f46f4f 100644 --- a/plugin/think-library/src/extend/PhinxExtend.php +++ b/plugin/think-library/src/extend/PhinxExtend.php @@ -292,7 +292,7 @@ CODE; private static function nextFile(string $class): string { [$filename, $versions, $startVersion] = [Str::snake($class), [], 20009999999999]; - ToolsExtend::findFilesYield(syspath('database/migrations'), function (SplFileInfo $info) use ($class, $filename, &$versions) { + ToolsExtend::findFilesArray(syspath('database/migrations'), function (SplFileInfo $info) use ($class, $filename, &$versions) { $bname = pathinfo($info->getBasename(), PATHINFO_FILENAME); $versions[] = $version = intval(substr($bname, 0, 14)); if ($filename === substr($bname, 15) && unlink($info->getRealPath())) { diff --git a/plugin/think-library/src/support/middleware/MultAccess.php b/plugin/think-library/src/support/middleware/MultAccess.php index 2dd6a355e..4ae50108f 100644 --- a/plugin/think-library/src/support/middleware/MultAccess.php +++ b/plugin/think-library/src/support/middleware/MultAccess.php @@ -169,7 +169,7 @@ class MultAccess // 加载应用函数文件 if (is_file($file = "{$appPath}common{$ext}")) include_once $file; // 加载应用配置文件 - ToolsExtend::findFilesYield($appPath . 'config', function (SplFileInfo $info) use ($ext) { + ToolsExtend::findFilesArray($appPath . 'config', function (SplFileInfo $info) use ($ext) { if (strtolower(".{$info->getExtension()}") === $ext) { $this->app->config->load($info->getPathname(), $info->getBasename($ext)); }