]> Raphaƫl G. Git Repositories - packbundle/blob - README.md
Fix composer
[packbundle] / README.md
1 Installation
2 ============
3
4 Applications that use Symfony Flex
5 ----------------------------------
6
7 Open a command console, enter your project directory and execute:
8
9 ```console
10 $ composer require <package-name>
11 ```
12
13 Applications that don't use Symfony Flex
14 ----------------------------------------
15
16 ### Step 1: Download the Bundle
17
18 Open a command console, enter your project directory and execute the
19 following command to download the latest stable version of this bundle:
20
21 ```console
22 $ composer require <package-name>
23 ```
24
25 This command requires you to have Composer installed globally, as explained
26 in the [installation chapter](https://getcomposer.org/doc/00-intro.md)
27 of the Composer documentation.
28
29 ### Step 2: Enable the Bundle
30
31 Then, enable the bundle by adding it to the list of registered bundles
32 in the `app/AppKernel.php` file of your project:
33
34 ```php
35 <?php
36 // app/AppKernel.php
37
38 // ...
39 class AppKernel extends Kernel
40 {
41 public function registerBundles()
42 {
43 $bundles = array(
44 // ...
45 new <vendor>\<bundle-name>\<bundle-long-name>(),
46 );
47
48 // ...
49 }
50
51 // ...
52 }
53 ```