From: Raphaƫl Gertz Date: Fri, 25 Oct 2019 13:39:07 +0000 (+0200) Subject: Handle assets in /web/ or /public/ X-Git-Tag: 0.0.4 X-Git-Url: https://git.rapsys.eu/packbundle/commitdiff_plain/94173f75e81f6e0b3401aec00ad06877f8b0fdb6?hp=6e85bf686f4707fdda22509e695d6fd833024fdc Handle assets in /web/ or /public/ --- diff --git a/DependencyInjection/RapsysPackExtension.php b/DependencyInjection/RapsysPackExtension.php index 7d66000..27b499a 100644 --- a/DependencyInjection/RapsysPackExtension.php +++ b/DependencyInjection/RapsysPackExtension.php @@ -36,7 +36,11 @@ class RapsysPackExtension extends Extension { */ public function getConfiguration(array $configs, ContainerBuilder $container) { //Get configuration instance with resolved web path - return new Configuration($container->getParameter('kernel.project_dir').'/web/'); + return new Configuration( + is_dir($webDir = ($projectDir = $container->getParameter('kernel.project_dir')).'/web/')? + $webDir: + $projectDir.'/public/' + ); } /**