# see https://symfony.com/doc/current/reference/configuration/framework.html
framework:
    secret: '%env(APP_SECRET)%'
    assets:
        packages:
            api_platform:
                base_path: '/'

    validation: { enabled: true }

    # Note that the session will be started ONLY if you read or write from it.
    session:
        handler_id: 'session.handler.native_file'
        save_path: '%kernel.project_dir%/var/sessions/%kernel.environment%'
        cookie_secure: auto
        #cookie_samesite: lax
        gc_maxlifetime: 7200 #2 hours #période d'inactivité souhaitée.
        gc_probability: null #https://symfony.com/doc/current/components/http_foundation/session_configuration.html#configuring-garbage-collection
        #cookie_lifetime: 25200 #1 day
        cookie_lifetime: 0 #A cookie lifetime of 0 means the cookie expires when the browser is closed.

    esi: true
    #fragments: true
    php_errors:
        log: true


when@test:
    framework:
        test: true
        session:
            storage_factory_id: session.storage.factory.mock_file
