Skip to content

Commit

Permalink
Use always available twig template loader to add custom paths
Browse files Browse the repository at this point in the history
  • Loading branch information
chives committed Feb 12, 2021
1 parent db38110 commit 36f9814
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions DependencyInjection/Compiler/TemplatePathPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ final class TemplatePathPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container)
{
if (true === $container->hasDefinition('twig.loader.native_filesystem')) {
$loaderDefinition = $container->getDefinition('twig.loader.native_filesystem');
} else {
$loaderDefinition = $container->getDefinition('twig.loader.filesystem');
}
$loaderDefinition = $container->getDefinition('twig.loader.native_filesystem');

$reflection = new ReflectionClass(DataSourceBundle::class);
$loaderDefinition->addMethodCall(
Expand Down

0 comments on commit 36f9814

Please sign in to comment.