Website/app/config/packages/framework.php
Snoweuph a9f6e950fc
Some checks are pending
Quality Check / Check (push) Waiting to run
#1: Switch Config to PHP
2024-04-22 22:28:41 +02:00

37 lines
1.2 KiB
PHP

<?php
declare(strict_types=1);
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
return static function (ContainerConfigurator $containerConfigurator): void {
$containerConfigurator->extension('framework', [
'secret' => '%env(APP_SECRET)%',
'http_method_override' => false,
'handle_all_throwables' => true,
'session' => [
'handler_id' => null,
'cookie_secure' => 'auto',
'cookie_samesite' => 'lax',
'storage_factory_id' => 'session.storage.factory.native',
],
'php_errors' => [
'log' => true,
],
]);
if ($containerConfigurator->env() === 'test') {
$containerConfigurator->extension('framework', [
'test' => true,
'session' => [
'storage_factory_id' => 'session.storage.factory.mock_file',
],
]);
}
if ($containerConfigurator->env() === 'prod') {
$containerConfigurator->extension('framework', [
'session' => [
'handler_id' => 'file://%kernel_project_dir%/var/sessions',
],
]);
}
};