Saturday, February 21, 2015

Removing AcmeDemoBundle from Symfony Project

The bundles in Symfony cannot be deleted simply. The bundles are called from various places. We need to unregister the bundle before deleting it. AcmeDemoBundle is a demo bundle and is not integrated with other bundles, so we can delete it easily. The process in doing it is described below

1) Unregistering the bundle from AppKernel::registerBundles() method in app/AppKernel.php. For that, delete following line in registerBundles() method.
$bundles[] = new Acme\DemoBundle\AcmeDemoBundle();

2) Removing Bundle Configuration from app/config/ folder. AcmeDemoBundle is a demo file and doesn't have configurations. It has only routing information. Remove routing information about AcmeDemoBundle from routing config file: app/config/routing_dev.yml. Delete following lines from routing config file.
    resource: "@AcmeDemoBundle/Resources/config/routing.yml"
3) Remove files from the system. Delete following folders and files
Now you are done in these simple steps.

No comments:

Post a Comment