I have installed a new bundle using composer
php bin/console generate:bundle
and I name it TestBundle
(Just to get familiar with the commands), after that I deleted it by following theses steps:
Now each time I open my app symfony shows me this error:
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.
How symfony keeps shwoing me errors about a bundle that does not exist ?!
就像@qooplmao所说的那样,当您通过命令行安装捆绑软件时,它将捆绑软件类名添加到AppKernel.php
并将路由值添加到routing.yml
,此外还从新生成的捆绑软件中将services.yml文件导入到其中在app/config
下的全局config.yml
,您需要删除该导入语句。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.