Permalink
Browse files

update yaml loading to latest Symfony2

  • Loading branch information...
1 parent 5ad6494 commit 0d36b6db2625ff14ca0b23b7231db2cde1de9f2f @igorw igorw committed Feb 16, 2011
Showing with 4 additions and 3 deletions.
  1. +4 −3 bootstrap.php
View
@@ -8,9 +8,10 @@
* with this source code in the file LICENSE.
*/
-use Symfony\Component\ClassLoader\UniversalClassLoader;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
+use Symfony\Component\ClassLoader\UniversalClassLoader;
+use Symfony\Component\Config\FileLocator;
$loader = new UniversalClassLoader;
$loader->registerPrefixes(array(
@@ -23,5 +24,5 @@
$env = isset($_SERVER['APP_ENV']) ? $_SERVER['APP_ENV'] : 'dev';
-$loader = new YamlFileLoader($container);
-$loader->load(__DIR__."/$env.config.yml");
+$loader = new YamlFileLoader($container, new FileLocator(__DIR__));
+$loader->load("$env.config.yml");

0 comments on commit 0d36b6d

Please sign in to comment.