feat(update): apply recipes:update symfony/framework-bundle
This commit is contained in:
parent
1abc6a7b60
commit
6a56bc2c36
|
@ -2,7 +2,7 @@
|
||||||
framework:
|
framework:
|
||||||
secret: '%env(APP_SECRET)%'
|
secret: '%env(APP_SECRET)%'
|
||||||
#csrf_protection: true
|
#csrf_protection: true
|
||||||
#http_method_override: true
|
http_method_override: false
|
||||||
|
|
||||||
# Enables session support. Note that the session will ONLY be started if you read or write from it.
|
# Enables session support. Note that the session will ONLY be started if you read or write from it.
|
||||||
# Remove or comment this section to explicitly disable session support.
|
# Remove or comment this section to explicitly disable session support.
|
||||||
|
@ -10,8 +10,15 @@ framework:
|
||||||
handler_id: null
|
handler_id: null
|
||||||
cookie_secure: auto
|
cookie_secure: auto
|
||||||
cookie_samesite: lax
|
cookie_samesite: lax
|
||||||
|
storage_factory_id: session.storage.factory.native
|
||||||
|
|
||||||
#esi: true
|
#esi: true
|
||||||
#fragments: true
|
#fragments: true
|
||||||
php_errors:
|
php_errors:
|
||||||
log: true
|
log: true
|
||||||
|
|
||||||
|
when@test:
|
||||||
|
framework:
|
||||||
|
test: true
|
||||||
|
session:
|
||||||
|
storage_factory_id: session.storage.factory.mock_file
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
framework:
|
|
||||||
test: true
|
|
||||||
session:
|
|
||||||
storage_id: session.storage.mock_file
|
|
|
@ -1,3 +0,0 @@
|
||||||
_errors:
|
|
||||||
resource: '@FrameworkBundle/Resources/config/routing/errors.xml'
|
|
||||||
prefix: /_error
|
|
4
config/routes/framework.yaml
Normal file
4
config/routes/framework.yaml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
when@dev:
|
||||||
|
_errors:
|
||||||
|
resource: '@FrameworkBundle/Resources/config/routing/errors.xml'
|
||||||
|
prefix: /_error
|
|
@ -2,7 +2,7 @@
|
||||||
# Files in the packages/ subdirectory configure your dependencies.
|
# Files in the packages/ subdirectory configure your dependencies.
|
||||||
|
|
||||||
# Put parameters here that don't need to change on each machine where the app is deployed
|
# Put parameters here that don't need to change on each machine where the app is deployed
|
||||||
# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
|
# https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration
|
||||||
parameters:
|
parameters:
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
|
@ -1,22 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use App\Kernel;
|
use App\Kernel;
|
||||||
use Symfony\Component\Dotenv\Dotenv;
|
|
||||||
use Symfony\Component\ErrorHandler\Debug;
|
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
|
||||||
|
|
||||||
require dirname(__DIR__).'/vendor/autoload.php';
|
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
|
||||||
|
|
||||||
(new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
|
return function (array $context) {
|
||||||
|
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
|
||||||
if ($_SERVER['APP_DEBUG']) {
|
};
|
||||||
umask(0000);
|
|
||||||
|
|
||||||
Debug::enable();
|
|
||||||
}
|
|
||||||
|
|
||||||
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
|
|
||||||
$request = Request::createFromGlobals();
|
|
||||||
$response = $kernel->handle($request);
|
|
||||||
$response->send();
|
|
||||||
$kernel->terminate($request, $response);
|
|
||||||
|
|
|
@ -3,36 +3,9 @@
|
||||||
namespace App;
|
namespace App;
|
||||||
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
|
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
|
||||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
|
||||||
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
|
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
|
||||||
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
|
|
||||||
|
|
||||||
class Kernel extends BaseKernel
|
class Kernel extends BaseKernel
|
||||||
{
|
{
|
||||||
use MicroKernelTrait;
|
use MicroKernelTrait;
|
||||||
|
|
||||||
protected function configureContainer(ContainerConfigurator $container): void
|
|
||||||
{
|
|
||||||
$container->import('../config/{packages}/*.yaml');
|
|
||||||
$container->import('../config/{packages}/'.$this->environment.'/*.yaml');
|
|
||||||
|
|
||||||
if (is_file(\dirname(__DIR__).'/config/services.yaml')) {
|
|
||||||
$container->import('../config/services.yaml');
|
|
||||||
$container->import('../config/{services}_'.$this->environment.'.yaml');
|
|
||||||
} elseif (is_file($path = \dirname(__DIR__).'/config/services.php')) {
|
|
||||||
(require $path)($container->withPath($path), $this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function configureRoutes(RoutingConfigurator $routes): void
|
|
||||||
{
|
|
||||||
$routes->import('../config/{routes}/'.$this->environment.'/*.yaml');
|
|
||||||
$routes->import('../config/{routes}/*.yaml');
|
|
||||||
|
|
||||||
if (is_file(\dirname(__DIR__).'/config/routes.yaml')) {
|
|
||||||
$routes->import('../config/routes.yaml');
|
|
||||||
} elseif (is_file($path = \dirname(__DIR__).'/config/routes.php')) {
|
|
||||||
(require $path)($routes->withPath($path), $this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
11
symfony.lock
11
symfony.lock
|
@ -391,19 +391,18 @@
|
||||||
"version": "v5.2.5"
|
"version": "v5.2.5"
|
||||||
},
|
},
|
||||||
"symfony/framework-bundle": {
|
"symfony/framework-bundle": {
|
||||||
"version": "5.2",
|
"version": "5.4",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
"repo": "github.com/symfony/recipes",
|
"repo": "github.com/symfony/recipes",
|
||||||
"branch": "master",
|
"branch": "main",
|
||||||
"version": "5.2",
|
"version": "5.4",
|
||||||
"ref": "6ec87563dcc85cd0c48856dcfbfc29610506d250"
|
"ref": "3cd216a4d007b78d8554d44a5b1c0a446dab24fb"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"config/packages/cache.yaml",
|
"config/packages/cache.yaml",
|
||||||
"config/packages/framework.yaml",
|
"config/packages/framework.yaml",
|
||||||
"config/packages/test/framework.yaml",
|
|
||||||
"config/preload.php",
|
"config/preload.php",
|
||||||
"config/routes/dev/framework.yaml",
|
"config/routes/framework.yaml",
|
||||||
"config/services.yaml",
|
"config/services.yaml",
|
||||||
"public/index.php",
|
"public/index.php",
|
||||||
"src/Controller/.gitignore",
|
"src/Controller/.gitignore",
|
||||||
|
|
Loading…
Reference in a new issue