Permalink
Browse files

added information about Composer in the README file

  • Loading branch information...
fabpot committed Jul 9, 2012
1 parent 623dfab commit b815a2fba29b4ce2e681639e32a55f2acad5e33f
Showing with 51 additions and 21 deletions.
  1. +51 −21 UPGRADE.md
View
@@ -4,6 +4,57 @@ Symfony Standard Edition Upgrade
From Symfony 2.0 to Symfony 2.1
-------------------------------
+### Project Dependencies
+
+As of Symfony 2.1, project dependencies are managed by
+[Composer](http://getcomposer.org/):
+
+* The `bin/vendors` script can be removed as `composer.phar` does all the work
+ now (it is recommended to install it globally on your machine).
+
+* The `deps` file need to be replaced with the `composer.json` one.
+
+* The `composer.lock` is the equivalent of the generated `deps.lock` file and
+ it is automatically generated by Composer.
+
+Download the default
+[`composer.json`](https://raw.github.com/symfony/symfony-standard/master/composer.json)
+and
+[`composer.lock`](https://raw.github.com/symfony/symfony-standard/master/composer.lock)
+files for Symfony 2.1 and put them into the main directory of your project. If
+you have customized your `deps` file, move the added dependencies to the
+`composer.json` file (many bundles and PHP libraries are already available as
+Composer packages -- search for them on [Packagist](http://packagist.org/)).
+
+Remove your current `vendors` directory.
+
+Finally, run Composer:
+
+ $ composer.phar install
+
+### `app/autoload.php`
+
+The default `autoload.php` reads as follows (it has been simplified a lot as
+autoloading for libraries and bundles declared in your `composer.json` file is
+automatically managed by the Composer autoloader):
+
+ <?php
+
+ use Doctrine\Common\Annotations\AnnotationRegistry;
+
+ $loader = include __DIR__.'/../vendor/autoload.php';
+
+ // intl
+ if (!function_exists('intl_get_error_code')) {
+ require_once __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php';
+
+ $loader->add('', __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs');
+ }
+
+ AnnotationRegistry::registerLoader(array($loader, 'loadClass'));
+
+ return $loader;
+
### `app/config/config.yml`
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:
`new JMS\AopBundle\JMSAopBundle(),
`new JMS\DiExtraBundle\JMSDiExtraBundle($this),
-### `app/autoload.php`
-
-The default `autoload.php` reads as follows:
-
- <?php
-
- use Doctrine\Common\Annotations\AnnotationRegistry;
-
- $loader = include __DIR__.'/../vendor/autoload.php';
-
- // intl
- if (!function_exists('intl_get_error_code')) {
- require_once __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php';
-
- $loader->add('', __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs');
- }
-
- AnnotationRegistry::registerLoader(array($loader, 'loadClass'));
-
- return $loader;
-
### `web/app.php`
The default `web/app.php` file now reads as follows:

0 comments on commit b815a2f

Please sign in to comment.