This is a command line tool for creating skeleton structure for symfony bundle:
- creates directory structure and necessary files under
src/
- activates your new bundle in symfony's
bundle.php
The namespace of your bundle will be App\[YourBundleName]
.
Make sure Composer is installed globally, as explained in the installation chapter of the Composer documentation.
Open a command console, enter your project directory and execute:
composer require netbrothers-gmbh/nbcsb-bundle
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
composer require netbrothers-gmbh/nbcsb-bundle
Then, enable the bundle by adding it to the list of registered bundles
in the config/bundles.php
file of your project:
// config/bundles.php
return [
// ...
NetBrothers\NbCsbBundle\NetBrothersNbCsbBundle::class => ['all' => true],
];
Open a command console, enter your project directory and execute the following command:
php bin/console netbrothers:make-bundle [YourBundleName]
Be aware to name your bundle with "Bundle" - like symfony demand.
# this is wrong !!!
php bin/console netbrothers:make-bundle Apple
# this is correct
php bin/console netbrothers:make-bundle AppleBundle
If you prefer to change templates:
- Find under
installation/templates
basic templates. Copy them to any place you like. - Copy
installation/config/packages/netbrothers_nbcsb.yaml
to symfony's config path - Insert into
netbrothers_nbcsb.yaml
your template path. - Clear symfony's cache.
Stefan Wessel, NetBrothers GmbH
MIT