Symfony 2 - How to delete a bundle?
It is basically the process you have outlined, only in somewhat different order.
- delete /src/Test/BlogBundle directory
- change /app/config/routing.yml file to remove the bundle routes
- remove your new bundle from /app/AppKernel.php
- clear cache (either by deleting cache/{$env} or console cache:clear)
If this wasn't installed using a dependency manager - that should be all.
I know I am late to answer this but Symfony has instructions on how to delete the bundle. This is how I delete. You can use the same instructions for other bundles you created and want to remove now.
To delete a bundle in Symfony 3 (and higher) :
Method 1 :
- go to
composer.json
, search & delete the bundle. - run composer update ( it will automatically remove the bundle and clear the cache)
Method 2 :
run composer remove alias/to/your/bundle
f.e : composer remove nesbot/carbon
That's all.