This commit is contained in:
2026-07-03 14:56:04 +08:00
parent d4a1e9c8d7
commit 48298ef1f7
+3 -3
View File
@@ -262,9 +262,9 @@ class Router
$usedArtifact = $router->importArtifact($artifact, $appChangedFiles); $usedArtifact = $router->importArtifact($artifact, $appChangedFiles);
} }
if (!$usedArtifact) { // routes 目录中的显式路由文件必须每次重建路由表时重新 include。
$this->read_dir_file(APP_PATH . 'routes'); // route artifact 只加速注解路由,不能替代 routes/*.php 的注册副作用。
} $this->read_dir_file(APP_PATH . 'routes');
if (!$routeChanged && !empty($appChangedFiles) && ($scanConfig['cache_enabled'] ?? false)) { if (!$routeChanged && !empty($appChangedFiles) && ($scanConfig['cache_enabled'] ?? false)) {
$scanner->scanFiles($appChangedFiles, APP_PATH . 'app/', null, !$usedArtifact); $scanner->scanFiles($appChangedFiles, APP_PATH . 'app/', null, !$usedArtifact);