Skip to content

Commit

Permalink
Merge pull request #195 from emulienfou/master
Browse files Browse the repository at this point in the history
Fixing issue when using "traditional" path notation
  • Loading branch information
lsmith77 authored Oct 8, 2018
2 parents ff3d7fa + b361b47 commit f40637c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ matrix:
env: SYMFONY_VERSION=3.4.*
- php: 7.2
env: SYMFONY_VERSION=4.0.*;ASSETIC=skip
- php: 7.2
env: SYMFONY_VERSION=4.1.*;ASSETIC=skip
- php: 7.2
env: SYMFONY_VERSION=@dev;ASSETIC=skip
- php: 7.0
Expand Down
12 changes: 8 additions & 4 deletions DependencyInjection/Compiler/ThemeCompilerPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,14 @@ public function process(ContainerBuilder $container)

$twigFilesystemLoaderDefinition = $container->findDefinition('twig.loader.filesystem');
$twigFilesystemLoaderDefinition->setClass($container->getParameter('liip_theme.filesystem_loader.class'));
$twigFilesystemLoaderDefinition->setArguments(array(
$container->getDefinition('liip_theme.templating_locator'),
$container->getDefinition('templating.filename_parser')
));

if (false === $container->has('templating')) {
$twigFilesystemLoaderDefinition->replaceArgument(0,
$container->getDefinition('liip_theme.templating_locator'));
$twigFilesystemLoaderDefinition->replaceArgument(1,
$container->getDefinition('templating.filename_parser'));
}

$twigFilesystemLoaderDefinition->addMethodCall('setActiveTheme', array(new Reference('liip_theme.active_theme')));
}
}

0 comments on commit f40637c

Please sign in to comment.