@@ -4,6 +4,57 @@ Symfony Standard Edition Upgrade
4
4
From Symfony 2.0 to Symfony 2.1
5
5
-------------------------------
6
6
7
+ ### Project Dependencies
8
+
9
+ As of Symfony 2.1, project dependencies are managed by
10
+ [ Composer] ( http://getcomposer.org/ ) :
11
+
12
+ * The ` bin/vendors ` script can be removed as ` composer.phar ` does all the work
13
+ now (it is recommended to install it globally on your machine).
14
+
15
+ * The ` deps ` file need to be replaced with the ` composer.json ` one.
16
+
17
+ * The ` composer.lock ` is the equivalent of the generated ` deps.lock ` file and
18
+ it is automatically generated by Composer.
19
+
20
+ Download the default
21
+ [ ` composer.json ` ] ( https://raw.github.com/symfony/symfony-standard/master/composer.json )
22
+ and
23
+ [ ` composer.lock ` ] ( https://raw.github.com/symfony/symfony-standard/master/composer.lock )
24
+ files for Symfony 2.1 and put them into the main directory of your project. If
25
+ you have customized your ` deps ` file, move the added dependencies to the
26
+ ` composer.json ` file (many bundles and PHP libraries are already available as
27
+ Composer packages -- search for them on [ Packagist] ( http://packagist.org/ ) ).
28
+
29
+ Remove your current ` vendors ` directory.
30
+
31
+ Finally, run Composer:
32
+
33
+ $ composer.phar install
34
+
35
+ ### ` app/autoload.php `
36
+
37
+ The default ` autoload.php ` reads as follows (it has been simplified a lot as
38
+ autoloading for libraries and bundles declared in your ` composer.json ` file is
39
+ automatically managed by the Composer autoloader):
40
+
41
+ <? php
42
+
43
+ use Doctrine\Common\Annotations\AnnotationRegistry;
44
+
45
+ $loader = include __DIR__.'/../vendor/autoload.php';
46
+
47
+ // intl
48
+ if (!function_exists('intl_get_error_code')) {
49
+ require_once __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php';
50
+
51
+ $loader-> add('', __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs');
52
+ }
53
+
54
+ AnnotationRegistry::registerLoader(array($loader, 'loadClass'));
55
+
56
+ return $loader;
57
+
7
58
### `app/config/config.yml`
8
59
9
60
The `framework.charset` setting must be removed. If you are not using `UTF-8`
@@ -130,27 +181,6 @@ The following bundles was added to the list of default registered bundles:
130
181
`new JMS\AopBundle\JMSAopBundle(),
131
182
`new JMS\DiExtraBundle\JMSDiExtraBundle($this),
132
183
133
- ### ` app/autoload.php `
134
-
135
- The default ` autoload.php ` reads as follows:
136
-
137
- <? php
138
-
139
- use Doctrine\Common\Annotations\AnnotationRegistry;
140
-
141
- $loader = include __DIR__.'/../vendor/autoload.php';
142
-
143
- // intl
144
- if (!function_exists('intl_get_error_code')) {
145
- require_once __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php';
146
-
147
- $loader-> add('', __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs');
148
- }
149
-
150
- AnnotationRegistry::registerLoader(array($loader, 'loadClass'));
151
-
152
- return $loader;
153
-
154
184
### `web/app.php`
155
185
156
186
The default `web/app.php` file now reads as follows:
0 commit comments