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
Extending Symfony2 Web Application Framework

You're reading from   Extending Symfony2 Web Application Framework Symfony2 took the great features of the original framework to new levels of extensibility. With this practical guide you'll learn how to make the most of Symfony2 through controlling your code and sharing it more widely.

Arrow left icon
Product type Paperback
Published in Mar 2014
Publisher
ISBN-13 9781783287192
Length 140 pages
Edition Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Sebastien Armand Sebastien Armand
Author Profile Icon Sebastien Armand
Sebastien Armand
Arrow right icon
View More author details
Toc

Creating the bundle


While developing our app initially, we didn't care about where our files were. Everything was under a giant monolithic bundle that included everything. We'll go through the following steps to change the situation and make a decoupled GithubAuthBundle:

  1. Set up the bundle.

  2. Move or write the code.

  3. Move or create the services configuration directly in the bundle.

  4. Define the bundle configuration and merge the user-defined parameters.

First, we will use the following command line provided by Symfony to generate an empty bundle:

php app/console generate:bundle

To do this, you have to choose a namespace and a bundle name, which in the case of this book are Khepin and GithubAuthBundle. Now, let's move all the required files to this new bundle and update their namespaces accordingly. In the end, our bundle structure should be as follows:

GithubAuthBundle/
    DependencyInjection/
        Configuration.php
        KhepinGithubAuthExtension.php
    Resources/
        config/
          ...
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