diff --git a/.travis.yml b/.travis.yml index adbbbec..aa13365 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,6 +39,7 @@ matrix: env: SYMFONY_VERSION=@dev;ASSETIC=skip before_install: + - if [[ $TRAVIS_PHP_VERSION = '5.6' ]]; then phpenv config-add travis.php.ini; fi - if [[ $TRAVIS_PHP_VERSION != '7.0' && $TRAVIS_PHP_VERSION != '7.1' && $TRAVIS_PHP_VERSION != '7.2' ]]; then phpenv config-rm xdebug.ini; fi - composer self-update - if [ "$SYMFONY_VERSION" != "" ]; then composer require "symfony/symfony:${SYMFONY_VERSION}" --no-update; fi; diff --git a/DependencyInjection/Compiler/ThemeCompilerPass.php b/DependencyInjection/Compiler/ThemeCompilerPass.php index a025656..f99dce0 100644 --- a/DependencyInjection/Compiler/ThemeCompilerPass.php +++ b/DependencyInjection/Compiler/ThemeCompilerPass.php @@ -28,8 +28,12 @@ public function process(ContainerBuilder $container) ->replaceArgument(2, null); } - $twigFilesystemLoaderDefinition = $container->getDefinition('twig.loader.filesystem'); + $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') + )); $twigFilesystemLoaderDefinition->addMethodCall('setActiveTheme', array(new Reference('liip_theme.active_theme'))); } } diff --git a/Resources/config/templating.xml b/Resources/config/templating.xml index fb4bd8a..ca3bc66 100644 --- a/Resources/config/templating.xml +++ b/Resources/config/templating.xml @@ -15,6 +15,8 @@ + + diff --git a/Tests/DependencyInjection/Compiler/ThemeCompilerPassTest.php b/Tests/DependencyInjection/Compiler/ThemeCompilerPassTest.php index 72e5701..121dc89 100644 --- a/Tests/DependencyInjection/Compiler/ThemeCompilerPassTest.php +++ b/Tests/DependencyInjection/Compiler/ThemeCompilerPassTest.php @@ -31,7 +31,7 @@ public function testProcess() ; $containerMock->expects($this->once()) - ->method('getDefinition') + ->method('findDefinition') ->with('twig.loader.filesystem') ->willReturn( $this->getMockBuilder('Symfony\Component\DependencyInjection\Definition') diff --git a/travis.php.ini b/travis.php.ini new file mode 100644 index 0000000..495b35c --- /dev/null +++ b/travis.php.ini @@ -0,0 +1 @@ +memory_limit = -1 \ No newline at end of file