Symfony 2 - How to delete a bundle?

后端 未结 2 1257
逝去的感伤
逝去的感伤 2021-01-30 13:37

So my question is how to delete bundle I created?

You create bundles with this console command:

php app/console generate:bundle --namespace=Test/BlogBund         


        
相关标签:
2条回答
  • 2021-01-30 13:57

    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.

    0 讨论(0)
  • 2021-01-30 14:11

    It is basically the process you have outlined, only in somewhat different order.

    1. delete /src/Test/BlogBundle directory
    2. change /app/config/routing.yml file to remove the bundle routes
    3. remove your new bundle from /app/AppKernel.php
    4. clear cache (either by deleting cache/{$env} or console cache:clear)

    If this wasn't installed using a dependency manager - that should be all.

    0 讨论(0)
提交回复
热议问题