简体   繁体   中英

Symfony2 is calling unknown bundle

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:

  1. remove it from AppKernel.php
  2. remove it's route from app/config/routing.yml
  3. and finally I deleted the related folder that contains the bundle

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM