diff --git a/cookbook/bundles/best_practices.rst b/cookbook/bundles/best_practices.rst index 055e0bee5a7..51465b9d15a 100644 --- a/cookbook/bundles/best_practices.rst +++ b/cookbook/bundles/best_practices.rst @@ -194,6 +194,59 @@ Extensive documentation should also be provided in the the ``Resources/doc/`` directory; the ``Resources/doc/index.rst`` file is the only mandatory file and must be the entry point for the documentation. +Installation Instructions +~~~~~~~~~~~~~~~~~~~~~~~~~ + +In order to ease the installation of third-party bundles, consider using the +following standardized instructions in your ``README.md`` file. + +.. code-block:: text + + Installation + ============ + + Step 1: Download the Bundle + --------------------------- + + Open a command console, enter your project directory and execute the + following command to download the latest stable version of this bundle: + + ```bash + $ composer require "~1" + ``` + + This command requires you to have Composer installed globally, as explained + in the [installation chapter](https://getcomposer.org/doc/00-intro.md) + of the Composer documentation. + + Step 2: Enable the Bundle + ------------------------- + + Then, enable the bundle by adding the following line in the `app/AppKernel.php` + file of your project: + + ```php + \\(), + ); + } + ``` + +This template assumes that your bundle is in its ``1.x`` version. If not, change +the ``"~1"`` installation version accordingly (``"~2"``, ``"~3"``, etc.) + +Optionally, you can add more installation steps (*Step 3*, *Step 4*, etc.) to +explain other required installation tasks, such as registering routes or +dumping assets. + Routing -------