moved twig globals to dynamic compiler pass (#264)

This commit is contained in:
Kevin Papst
2018-08-10 00:11:48 +02:00
committed by GitHub
parent 3dcd38eca7
commit c6e99b35d5
10 changed files with 128 additions and 20 deletions

View File

@@ -11,6 +11,7 @@ namespace App;
use App\DependencyInjection\AppExtension;
use App\DependencyInjection\Compiler\DoctrineCompilerPass;
use App\DependencyInjection\Compiler\TwigContextCompilerPass;
use App\Timesheet\CalculatorInterface;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
use Symfony\Component\Config\Loader\LoaderInterface;
@@ -66,6 +67,7 @@ class Kernel extends BaseKernel
$loader->load($confDir . '/services_' . $this->environment . self::CONFIG_EXTS, 'glob');
$container->addCompilerPass(new DoctrineCompilerPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -1000);
$container->addCompilerPass(new TwigContextCompilerPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -1000);
}
protected function configureRoutes(RouteCollectionBuilder $routes)