我使用composer
安装了一个新的包
php bin/console generate:bundle
我将其命名为TestBundle
(只是为了熟悉这些命令),之后我按照以下步骤将其删除:
现在,每次打开我的应用程序时,symfony都会显示此错误:
Bundle "TestBundle" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() method of your AppKernel.php file? in @TestBundle/Resources/config/services.yml (which is being imported from "C:\wamp\www\symfony1\app/config\config.yml"). Make sure the "TestBundle/Resources/config/services.yml" bundle is correctly registered and loaded in the application kernel class. If the bundle is registered, make sure the bundle path "@TestBundle/Resources/config/services.yml" is not empty.
symfony如何不断地告诉我关于不存在的捆绑包的错误?!
答案 0 :(得分:0)
就像@qooplmao所说,当你通过命令行安装一个bundle时,它会将bundle类名添加到AppKernel.php
并将值路由到routing.yml
除了它导入services.yml之外将新生成的包中的文件发送到config.yml
下的全局app/config
,您需要删除该导入语句。