Skip to content

Commit

Permalink
Merge pull request #80 from chives/2.1
Browse files Browse the repository at this point in the history
Use always available twig template loader to add custom paths
  • Loading branch information
szymach authored Feb 12, 2021
2 parents db38110 + 36f9814 commit 8b46861
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 8b46861

Please sign in to comment.