From b035020c6fe52ec4cd9e227ee9969454b14dcc15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 27 May 2025 10:20:55 +0200 Subject: [PATCH] Clarify and expand "create a new bundle" documentation Rewrote the "create a new bundle" guide for clarity and completeness. Added detailed steps for creating a bundle class, registering namespaces in `composer.json`, updating configuration files, and dumping autoload. These changes aim to make the instructions easier to follow for new developers. --- .../development/create-a-new-bundle.rst | 81 +++++++++++++++---- 1 file changed, 67 insertions(+), 14 deletions(-) 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.