From 5ee696001dcaf768969f0b9f0af1c703218678cc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Mon, 26 Mar 2018 11:30:25 +0200 Subject: [PATCH] Switch to web directory for compiled assets by default --- Resources/config/parameters.yml | 2 +- Twig/PackExtension.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Resources/config/parameters.yml b/Resources/config/parameters.yml index 2b22993..900a6c1 100644 --- a/Resources/config/parameters.yml +++ b/Resources/config/parameters.yml @@ -21,7 +21,7 @@ framework: assets: packages: rapsys_pack: - base_path: '/bundles/rapsyspack' + base_path: ~ version: ~ # Force cache disable to regenerate resources each time diff --git a/Twig/PackExtension.php b/Twig/PackExtension.php index 5ce4ed6..ee84c47 100644 --- a/Twig/PackExtension.php +++ b/Twig/PackExtension.php @@ -17,7 +17,8 @@ class PackExtension extends \Twig_Extension { $this->assetsPackages = $assetsPackages; //Set default prefix - $this->prefix = '@RapsysPackBundle/Resources/public/'; + //XXX: require symfony 3.3 + $this->prefix = $this->containerInterface->getParameter('kernel.project_dir').'/web/'; //Set default coutput $this->coutput = 'css/*.pack.css'; -- 2.41.0