[FrameworkBundle] added more file to the class cache when using the PHP templating engine
This commit is contained in:
parent
4e877a84ad
commit
b7a0f71b87
@ -263,8 +263,30 @@ class FrameworkExtension extends Extension
|
||||
throw new \LogicException('You must register at least one templating engine.');
|
||||
}
|
||||
|
||||
$this->addClassesToCompile(array(
|
||||
'Symfony\\Bundle\\FrameworkBundle\\Templating\\EngineInterface',
|
||||
'Symfony\\Component\\Templating\\EngineInterface',
|
||||
'Symfony\\Bundle\\FrameworkBundle\\Templating\\Loader\\TemplateLocatorInterface',
|
||||
$container->findDefinition('templating.locator')->getClass(),
|
||||
));
|
||||
|
||||
foreach ($engines as $i => $engine) {
|
||||
$engines[$i] = new Reference('templating.engine.'.(is_array($engine) ? $engine['id'] : $engine));
|
||||
$id = is_array($engine) ? $engine['id'] : $engine;
|
||||
$engines[$i] = new Reference('templating.engine.'.$id);
|
||||
|
||||
if ('php' === $id) {
|
||||
$this->addClassesToCompile(array(
|
||||
'Symfony\\Component\\Templating\\PhpEngine',
|
||||
'Symfony\\Component\\Templating\\TemplateNameParserInterface',
|
||||
'Symfony\\Component\\Templating\\TemplateNameParser',
|
||||
'Symfony\\Component\\Templating\\Loader\\LoaderInterface',
|
||||
'Symfony\\Component\\Templating\\Storage\\Storage',
|
||||
'Symfony\\Component\\Templating\\Storage\\FileStorage',
|
||||
'Symfony\\Bundle\\FrameworkBundle\\Templating\\PhpEngine',
|
||||
'Symfony\\Bundle\\FrameworkBundle\\Templating\\TemplateNameParser',
|
||||
'Symfony\\Bundle\\FrameworkBundle\\Templating\\Loader\\FilesystemLoader',
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
if (1 === count($engines)) {
|
||||
@ -275,13 +297,6 @@ class FrameworkExtension extends Extension
|
||||
|
||||
$container->setAlias('templating', 'templating.engine.delegating');
|
||||
}
|
||||
|
||||
$this->addClassesToCompile(array(
|
||||
'Symfony\\Bundle\\FrameworkBundle\\Templating\\EngineInterface',
|
||||
'Symfony\\Component\\Templating\\EngineInterface',
|
||||
'Symfony\\Bundle\\FrameworkBundle\\Templating\\Loader\\TemplateLocatorInterface',
|
||||
$container->findDefinition('templating.locator')->getClass(),
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user