merged branch janmarek/patch-1 (PR #5202)

Commits
-------

890aea2 FileLocatorInterface used in typehint instead of FileLocator

Discussion
----------

FileLocatorInterface used in typehint instead of FileLocator

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

by stof at 2012-08-30T22:09:39Z

@fabpot this makes sense (and it is BC)

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

by mvrhov at 2012-08-31T08:34:17Z

What's wrong with Interface hint? I always hint interface when available as this means that I can inject whatever class implementing that interface.
This commit is contained in:
Fabien Potencier 2012-08-31 11:52:07 +02:00
commit 5e7723fcbb
1 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@ namespace Symfony\Component\DependencyInjection\Loader;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Config\Loader\FileLoader as BaseFileLoader;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\Config\FileLocatorInterface;
/**
* FileLoader is the abstract class used by all built-in loaders that are file based.
@ -28,9 +28,9 @@ abstract class FileLoader extends BaseFileLoader
* Constructor.
*
* @param ContainerBuilder $container A ContainerBuilder instance
* @param FileLocator $locator A FileLocator instance
* @param FileLocatorInterface $locator A FileLocator instance
*/
public function __construct(ContainerBuilder $container, FileLocator $locator)
public function __construct(ContainerBuilder $container, FileLocatorInterface $locator)
{
$this->container = $container;