Website/config/packages/framework.php
Snoweuph 5f7e43113e
Some checks failed
Quality Check / QS Backend (push) Successful in 15s
Quality Check / QS Frontend (push) Failing after 1m10s
NOTICKET: Refactor Project Layout
2024-07-30 05:43:44 +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');
}
};