Revert "bug #18908 [DependencyInjection] force enabling the external XML entity loaders (xabbuh)"

This reverts commit 44f6f89308, reversing
changes made to 57d6053822.
This commit is contained in:
Nicolas Grekas 2016-05-30 10:31:06 +02:00
parent 44f6f89308
commit 91635a8054
2 changed files with 0 additions and 15 deletions

View File

@ -333,9 +333,7 @@ $imports
EOF
;
$disableEntities = libxml_disable_entity_loader(false);
$valid = @$dom->schemaValidateSource($source);
libxml_disable_entity_loader($disableEntities);
foreach ($tmpfiles as $tmpfile) {
@unlink($tmpfile);

View File

@ -83,19 +83,6 @@ class XmlFileLoaderTest extends \PHPUnit_Framework_TestCase
$this->assertInstanceOf('Symfony\\Component\\DependencyInjection\\SimpleXMLElement', $xml, '->parseFile() returns an SimpleXMLElement object');
}
public function testLoaderTurnsOnEntityLoaderIfNecessary()
{
$oldValue = libxml_disable_entity_loader(true);
$containerBuilder = new ContainerBuilder();
$loader = new XmlFileLoader($containerBuilder, new FileLocator(self::$fixturesPath.'/xml'));
$loader->load('services2.xml');
libxml_disable_entity_loader($oldValue);
$this->assertTrue(count($containerBuilder->getParameterBag()->all()) > 0, 'Parameters can be read from the config file.');
}
public function testLoadParameters()
{
$container = new ContainerBuilder();