Skip to content

Commit b297d29

Browse files
committed
First draft of the bundle installation instructions
1 parent b87f1ee commit b297d29

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

cookbook/bundles/best_practices.rst

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,53 @@ semantic configuration described in the cookbook.
268268
If you are defining services, they should also be prefixed with the bundle
269269
alias.
270270

271+
Installation instructions
272+
-------------------------
273+
274+
In order to ease the installation process of third-party bundles, we propose
275+
you to use the following standardized instructions in your ``README`` file:
276+
277+
.. code-block::
278+
279+
Installation
280+
============
281+
282+
Step 1: Download the bundle
283+
---------------------------
284+
285+
Use Composer to add the bundle as a new dependency of your project:
286+
287+
.. code-block:: bash
288+
289+
$ composer require "<vendor>/<bundle-name>:dev-master"
290+
291+
This command requires to have installed Composer globally, as explained
292+
`in the installation chapter <https://getcomposer.org/doc/00-intro.md>`_
293+
of Composer documentation.
294+
295+
Step 2: Enable the bundle
296+
-------------------------
297+
298+
Then, enable the bundle adding the following line in the ``AppKernel`` class
299+
of your project:
300+
301+
.. code-block:: php
302+
303+
<?php
304+
// app/AppKernel.php
305+
306+
public function registerBundles()
307+
{
308+
$bundles = array(
309+
// ...
310+
311+
new <vendor>\<bundle-name>\<bundle-long-name>(),
312+
);
313+
}
314+
315+
(optionally add *Step 3*, *Step 4*, etc. to explain other required
316+
installation steps, such as registering routes or dumping assets)
317+
271318
Learn more from the Cookbook
272319
----------------------------
273320

0 commit comments

Comments
 (0)