diff --git a/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php index ce135fa81f..21c706fc59 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php @@ -51,7 +51,7 @@ class YamlFileLoader extends FileLoader } // imports - $this->parseImports($content, $file); + $this->parseImports($content, $path); // parameters if (isset($content['parameters'])) { diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services4.yml b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services4.yml index 18f10658c4..8e0987fd03 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services4.yml +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services4.yml @@ -1,6 +1,7 @@ imports: - { resource: services2.yml } - { resource: services3.yml } + - { resource: "../php/simple.php" } - { resource: "../ini/parameters.ini", class: Symfony\Component\DependencyInjection\Loader\IniFileLoader } - { resource: "../ini/parameters2.ini" } - { resource: "../xml/services13.xml" } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php index 85ac9e3a97..008a6c591f 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php @@ -18,6 +18,7 @@ use Symfony\Component\Config\Loader\Loader; use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; use Symfony\Component\DependencyInjection\Loader\IniFileLoader; +use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; use Symfony\Component\Config\Loader\LoaderResolver; use Symfony\Component\Config\FileLocator; @@ -93,6 +94,7 @@ class YamlFileLoaderTest extends \PHPUnit_Framework_TestCase $resolver = new LoaderResolver(array( new IniFileLoader($container, new FileLocator(self::$fixturesPath.'/yaml')), new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/yaml')), + new PhpFileLoader($container, new FileLocator(self::$fixturesPath.'/php')), $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath.'/yaml')), )); $loader->setResolver($resolver);