diff --git a/src/Symfony/Component/Config/Loader/FileLoader.php b/src/Symfony/Component/Config/Loader/FileLoader.php index 9c1b4d9f1e..88ec070f17 100644 --- a/src/Symfony/Component/Config/Loader/FileLoader.php +++ b/src/Symfony/Component/Config/Loader/FileLoader.php @@ -86,7 +86,12 @@ abstract class FileLoader extends Loader // we fallback to the current locator to keep BC // as some some loaders do not call the parent __construct() // @deprecated should be removed in 3.0 - $locator = $loader->getLocator() ?: $this->locator; + $locator = $loader->getLocator(); + if (null === $locator) { + @trigger_error('Not calling the parent constructor in '.get_class($loader).' which extends '.__CLASS__.' is deprecated since version 2.7 and will not be supported anymore in 3.0.', E_USER_DEPRECATED); + $locator = $this->locator; + } + $resource = $locator->locate($resource, $this->currentDir, false); }