Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Symfony2 Essentials

You're reading from   Symfony2 Essentials

Arrow left icon
Product type Paperback
Published in Sep 2015
Publisher
ISBN-13 9781784398767
Length 158 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Cleanups

Before we start writing our own app, we need to do some cleanups. We need to configure AppBundle to use the YAML configuration. While this is possible to switch the configuration format manually, we will remove the bundle (it doesn't contain much code yet), and we will generate a new bundle to demonstrate new bundle creation.

Recreating AppBundle

To recreate AppBundle, remove it first as follows:

$ rm -rf src/AppBundle

Remove it from app/AppKernel.php by removing the following line:

new AppBundle\AppBundle(),

Remove it's routing (app/config/routing.yml), which is as follows:

app:
    resource: @AppBundle/Controller/
    type:     annotation

Now we will need to generate it again. Issue the following command:

$ php app/console generate:bundle --namespace=AppBundle

Now provide the following answers to the generator:

Bundle name [AppBundle]: [Enter]
Target directory [.../todoapp/src]: [Enter]
Configuration format (yml, xml, php, or annotation): yml
Do you want to generate the whole...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image