Website/app/config/packages/framework.php
Snoweuph 37a63c29cc
Some checks failed
Quality Check / Check (push) Failing after 3s
#1: Restructure
2024-07-13 12:30:13 +02:00

28 lines
879 B
PHP

<?php
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symfony\Config\FrameworkConfig;
return static function (FrameworkConfig $framework, ContainerConfigurator $container): void {
$framework->secret('%env(APP_SECRET)%');
$framework->httpMethodOverride(false);
$framework->handleAllThrowables(true);
$framework->session()
->handlerId(null)
->cookieSecure("auto")
->cookieSamesite("lax")
->storageFactoryId("session.storage.factory.native");
$framework->phpErrors(["log" => true]);
if ($container->env() === "test") {
$framework->test(true);
$framework->session()->storageFactoryId("session.storage.factory.mock_file");
}
if ($container->env() === "prod") {
$framework->session()->handlerId('file://%kernel.project_dir%/var/sessions');
}
};