Skip to content

S3SessionFactory

session slot factory for S3SessionPersistence.

yaml session: class: Quiote\Storage\S3\S3SessionFactory params: region: eu-west-1 bucket: my-app-sessions access_key_id: '%env(AWS_ACCESS_KEY_ID)%' secret_access_key: '%env(AWS_SECRET_ACCESS_KEY)%' key_prefix: 'sessions/' # endpoint: 'https://minio.internal' # any S3-compatible service

The %env(NAME)% credentials are read from the process environment when the compiled configuration is loaded, not when it is compiled, so no key is written into the config cache — see EnvPlaceholder.

Bring your own PSR-18 client, bound in the container — the same contract quioteframework/filesystem-s3 uses. The bucket must already exist; creation and lifecycle belong to infrastructure tooling, not a session backend.

final class S3SessionFactory implements SessionFactoryInterface

ImplementsSessionFactoryInterface
Since3.0.0
SourceS3SessionFactory.php
MethodDescription
createPersistence(Context $context, array<string, mixed> $parameters): SessionPersistenceInterfaceBuilds S3-backed session persistence from the slot’s parameters.

public function createPersistence(Context $context, array<string, mixed> $parameters): SessionPersistenceInterface

Builds S3-backed session persistence from the slot’s parameters.

ParameterTypeDescription
$contextContext
$parametersarray``<``string``, ``mixed``>

Returns SessionPersistenceInterface

ThrowsWhen
RuntimeExceptionIf no PSR-18 client is bound in the container.