diff --git a/docs/source/development/create-a-new-bundle.rst b/docs/source/development/create-a-new-bundle.rst index 087487ff0..61eda87bd 100644 --- a/docs/source/development/create-a-new-bundle.rst +++ b/docs/source/development/create-a-new-bundle.rst @@ -11,24 +11,77 @@ Create a new bundle ******************* -Create your own bundle is not a trivial task. - -The easiest way to achieve this is seems to be : - -1. Prepare a fresh installation of the chill project, in a new directory -2. Create a new bundle in this project, in the src directory -3. Initialize a git repository **at the root bundle**, and create your initial commit. -4. Register the bundle with composer/packagist. If you do not plan to distribute your bundle with packagist, you may use a custom repository for achieve this [#f1]_ -5. Move to a development installation, made as described in the :ref:`installation-for-development` section, and add your new repository to the composer.json file -6. Work as :ref:`usual ` - .. warning:: This part of the doc is not yet tested -TODO +Create a new directory with Bundle class +---------------------------------------- + +.. code-block:: bash + + mkdir -p src/Bundle/ChillSomeBundle/src + +Add a bundle file + +.. code-block:: php + + ['all' => true], + +Add the doctrine_migration namespace +------------------------------------ + +Add the namespace to :code:`config/packages/doctrine_migrations_chill.yaml` + +.. code-block:: diff + + doctrine_migrations: + migrations_paths: + + 'Chill\Some\Ticket': '@ChillSomeBundle/migrations' + +Dump autoloading +---------------- + +.. code-block:: bash + + symfony composer dump-autoload -.. [#f1] Be aware that we use the Affero GPL Licence, which ensure that all users must have access to derivative works done with this software.