Implementation

We start of by creating a new module called Foggyline\CustomerBundle. We do so with the help of console, by running the command as follows:

php bin/console generate:bundle --namespace=Foggyline/CustomerBundle

The command triggers an interactive process asking us several questions along the way, as shown in the following screenshot:

Implementation

Once done, the following structure is generated for us:

Implementation

If we now take a look at the app/AppKernel.php file, we would see the following line under the registerBundles method:

new Foggyline\CustomerBundle\FoggylineCustomerBundle() ...

Get Modular Programming with PHP 7 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.