Permalink
Browse files

merged branch jalliot/autoloader-update (PR #5213)

This PR was merged into the master branch.

Commits
-------

92e10a8 Updated HttpFoundation and Locale for proper Composer autoloading

Discussion
----------

Updated HttpFoundation and Locale for proper Composer autoloading

This PR uses better Composer autoloading strategy for the stubs in HttpFoundation and Locale.

It also fixes a bug inside HttpFoundation's composer.json file where the path for SessionHandlerInterface was wrong.

[![Build Status](https://secure.travis-ci.org/jalliot/symfony.png?branch=autoloader-update)](http://travis-ci.org/jalliot/symfony)

After merging this PR and updating the vendors of the SE, you can also merge symfony/symfony-standard#387

---------------------------------------------------------------------------

by datiecher at 2012-09-05T11:15:39Z

Any updates on this issue?

---------------------------------------------------------------------------

by jalliot at 2012-09-05T16:43:46Z

Well I guess it is up to @fabpot to decide now :)

---------------------------------------------------------------------------

by drak at 2012-09-07T11:59:22Z

> It also fixes a bug inside HttpFoundation's composer.json file where the path for SessionHandlerInterface was wrong.

If so should be part of a separate PR imo.
  • Loading branch information...
2 parents 2c4ed86 + 92e10a8 commit dda2f7cdb3ca084b3a13d28b61f8b54fdeb3f543 @fabpot fabpot committed Sep 29, 2012
View
@@ -62,10 +62,11 @@
"monolog/monolog": "dev-master"
},
"autoload": {
- "psr-0": {
- "Symfony\\": "src/",
- "SessionHandlerInterface": "src/Symfony/Component/HttpFoundation/Resources/stubs"
- }
+ "psr-0": { "Symfony\\": "src/" },
+ "classmap": [
+ "src/Symfony/Component/HttpFoundation/Resources/stubs",
+ "src/Symfony/Component/Locale/Resources/stubs"
+ ]
},
"minimum-stability": "dev",
"extra": {
@@ -31,7 +31,7 @@ the HTTP specification.
Loading
-------
-If you are using PHP 5.3.x you must add the following to your autoloader:
+If you are not using Composer but are using PHP 5.3.x, you must add the following to your autoloader:
// SessionHandlerInterface
if (!interface_exists('SessionHandlerInterface')) {
@@ -19,10 +19,8 @@
"php": ">=5.3.3"
},
"autoload": {
- "psr-0": {
- "Symfony\\Component\\HttpFoundation\\": "",
- "SessionHandlerInterface": "Symfony/Component/HttpFoundation/Resources/stubs"
- }
+ "psr-0": { "Symfony\\Component\\HttpFoundation\\": "" },
+ "classmap": [ "Resources/stubs" ]
},
"target-dir": "Symfony/Component/HttpFoundation",
"minimum-stability": "dev",
@@ -14,6 +14,9 @@ requires adding the following lines to your autoloader:
$loader->registerPrefixFallback(__DIR__.'/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs');
}
+If you are using Composer for autoloading, then you can even simplify it by
+removing the ``$loader->registerPrefixFallback`` line.
+
Resources
---------
@@ -33,4 +36,4 @@ This way the tests will use the ICU data files with the same version of your
``intl`` extension.
Read the file ``Resources/data/UPDATE.txt`` for more info about building or
-updating the ICU data files.
+updating the ICU data files.
@@ -22,7 +22,8 @@
"ext-intl": ">=5.3.3"
},
"autoload": {
- "psr-0": { "Symfony\\Component\\Locale\\": "" }
+ "psr-0": { "Symfony\\Component\\Locale\\": "" },
+ "classmap": [ "Resources/stubs" ]
},
"target-dir": "Symfony/Component/Locale",
"minimum-stability": "dev",

0 comments on commit dda2f7c

Please sign in to comment.