fix routing.php
This commit is contained in:
parent
321173dfe6
commit
9c4648eb94
2 changed files with 12 additions and 7 deletions
|
@ -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,
|
||||
],
|
||||
]);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue