Implementation

We will start off by creating a new module called Foggyline\ShipmentBundle. We will do so with the help of the console by running the following command:

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

The command triggers an interactive process, which asks us several questions along the way, shown as follows:

Implementation

Once done, files app/AppKernel.php and app/config/routing.yml are modified automatically. The registerBundles method of an AppKernel class has been added to the following line under the $bundles array:

new Foggyline\PaymentBundle\FoggylineShipmentBundle(),

The routing.yml file has been updated with the following ...

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.