Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

多应用模式下php think route:list问题 #2902

Open
zcpin opened this issue Jun 26, 2023 · 0 comments · May be fixed by #2992
Open

多应用模式下php think route:list问题 #2902

zcpin opened this issue Jun 26, 2023 · 0 comments · May be fixed by #2992
Labels

Comments

@zcpin
Copy link

zcpin commented Jun 26, 2023

在多应用模式下,routePath被改成了应用下的route目录,如下代码:

vendor/topthink/think-multi-app/src/MultiApp.php 82行

return $this->app->getAppPath() . 'route' . DIRECTORY_SEPARATOR;
而在命令执行时,还是取得项目根目录下的route目录,如下代码:

vendor/topthink/framework/src/think/console/command/RouteList.php 63行

$path = $this->app->getRootPath() . 'route' . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR;
故,在多应用模式下,命令执行得不到对应路由表

@big-dream big-dream linked a pull request Mar 27, 2024 that will close this issue
@big-dream big-dream added the bug label Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants