Website/config/packages/framework.php
Snoweuph 685e460bc7
Some checks failed
Quality Check / QS Backend (push) Successful in 16s
Quality Check / QS Frontend (push) Failing after 27s
NOTICKET: Refactor Project Layout
2024-07-30 05:42:19 +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');
}
};