如何解决Symfony 5-捆绑包“ WebProfilerBundle”不存在或未启用
在生产环境中,如果我尝试cache:clear
,则出现此错误:
In FileLoader.php line 173:
Bundle "WebProfilerBundle" does not exist or it is not enabled. Maybe you forgot to add it in the "registerBundles()" method of your "App\Kernel.php" file? in @WebProfilerBundle/Res
ources/config/routing/wdt.xml (which is being imported from "C:\Users\user\Desktop\SylviaTest\config/routes/dev/web_profiler.yaml"). Make sure the "WebProfilerBundle/Resources/confi
g/routing/wdt.xml" bundle is correctly registered and loaded in the application kernel class. If the bundle is registered,make sure the bundle path "@WebProfilerBundle/Resources/co
nfig/routing/wdt.xml" is not empty.
In Kernel.php line 226:
Bundle "WebProfilerBundle" does not exist or it is not enabled. Maybe you forgot to add it in the "registerBundles()" method of your "App\Kernel.php" file?
我不明白为什么...
config / routes / dev / web_profiler.yaml:
web_profiler_wdt:
resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml'
prefix: /_wdt
web_profiler_profiler:
resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml'
prefix: /_profiler
我不需要此文件,因为我不需要它
在我的 config / bundles.php 中,我已经:
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true,'test' => true,'panther' => true],
感谢您的帮助!
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。