fix routing.php

This commit is contained in:
lubiana 2025-04-27 11:44:23 +02:00
parent 321173dfe6
commit 9c4648eb94
Signed by: lubiana
SSH key fingerprint: SHA256:vW1EA0fRR3Fw+dD/sM0K+x3Il2gSry6YRYHqOeQwrfk
2 changed files with 12 additions and 7 deletions

View file

@ -1,13 +1,16 @@
<?php declare(strict_types=1);
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symfony\Config\Framework\RouterConfig;
return static function (
RouterConfig $routerConfig,
ContainerConfigurator $containerConfigurator
): void {
return static function (ContainerConfigurator $containerConfigurator): void {
$containerConfigurator->extension('framework', [
'router' => null,
]);
if ($containerConfigurator->env() === 'prod') {
$routerConfig->strictRequirements(false);
$containerConfigurator->extension('framework', [
'router' => [
'strict_requirements' => null,
],
]);
}
};

View file

@ -8,13 +8,15 @@ fi
mkdir $TARGETDIR
cd $TARGETDIR || return
pathsToCopy="public bin config migrations src templates composer.json composer.lock symfony.lock .env"
pathsToCopy="public bin config migrations src templates composer.json composer.lock symfony.lock .env assets package.json package.lock webpack.config.js"
for path in $pathsToCopy
do
cp -r ../../"$path" ./
done
npm install
npm run build
APP_ENV=prod composer install --no-dev -a
rm -rf ./var/cache