Skip to content

Commit

Permalink
Merge pull request #79 from chives/2.1
Browse files Browse the repository at this point in the history
Fixed template paths when templating component is not loaded
  • Loading branch information
rn0 authored Feb 12, 2021
2 parents 388c4fb + 5626f28 commit db38110
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion DependencyInjection/Compiler/TemplatePathPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ final class TemplatePathPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container)
{
$loaderDefinition = $container->getDefinition('twig.loader.filesystem');
if (true === $container->hasDefinition('twig.loader.native_filesystem')) {
$loaderDefinition = $container->getDefinition('twig.loader.native_filesystem');
} else {
$loaderDefinition = $container->getDefinition('twig.loader.filesystem');
}

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

0 comments on commit db38110

Please sign in to comment.