Permalink
Browse files

feature #4236 Javiereguiluz bundle install instructions (WouterJ)

This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #4236).

Discussion
----------

Javiereguiluz bundle install instructions

Replaces #4163

Commits
-------

7097070 Added the fixes suggested by Ryan
35dddba Reworded a bit the installation instructions
7a6644b Removed the sidebar and made some minor tweaks
41ce2a5 Minor fixes and tweaks
4b29de2 More tweaks and fixes
322ec60 Removed the first person perspective and other minor fixes
c39f7d3 Fixed some code formatting
ed96447 More improvements based on reviewers' comments
21ce2c0 Fixed minor typo
11db860 Applied all the fixes and suggestions made by reviewers
b297d29 First draft of the bundle installation instructions
  • Loading branch information...
weaverryan committed Sep 16, 2014
2 parents 9fd91d6 + 13e369d commit 9b4b36fa5f653e621e86363cd060c693c308c62f
Showing with 53 additions and 0 deletions.
  1. +53 −0 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 <package-name> "~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
<?php
// app/AppKernel.php
// ...
public function registerBundles()
{
$bundles = array(
// ...
return new <vendor>\<bundle-name>\<bundle-long-name>(),
);
}
```
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
-------

0 comments on commit 9b4b36f

Please sign in to comment.