Skip to content

Commit

Permalink
Updated HttpFoundation and Locale for proper Composer autoloading
Browse files Browse the repository at this point in the history
  • Loading branch information
jalliot committed Aug 8, 2012
1 parent 7dbadbf commit 92e10a8
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
9 changes: 5 additions & 4 deletions composer.json
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/HttpFoundation/README.md
Expand Up @@ -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')) {
Expand Down
6 changes: 2 additions & 4 deletions src/Symfony/Component/HttpFoundation/composer.json
Expand Up @@ -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",
"extra": {
Expand Down
5 changes: 4 additions & 1 deletion src/Symfony/Component/Locale/README.md
Expand Up @@ -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
---------

Expand All @@ -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.
3 changes: 2 additions & 1 deletion src/Symfony/Component/Locale/composer.json
Expand Up @@ -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",
"extra": {
Expand Down

0 comments on commit 92e10a8

Please sign in to comment.