namespace Symfony\Component\DependencyInjection\Loader;
-use Symfony\Component\Config\Resource\FileResource;
use Symfony\Component\Config\Util\XmlUtils;
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
{
$path = $this->locator->locate($resource);
- $this->container->addResource(new FileResource($path));
+ $this->container->fileExists($path);
// first pass to catch parsing errors
$result = parse_ini_file($path, true);
*/
public function supports($resource, $type = null)
{
- return is_string($resource) && 'ini' === pathinfo($resource, PATHINFO_EXTENSION);
+ if (!is_string($resource)) {
+ return false;
+ }
+
+ if (null === $type && 'ini' === pathinfo($resource, PATHINFO_EXTENSION)) {
+ return true;
+ }
+
+ return 'ini' === $type;
}
/**