coral-media / http-foundation
Component to extend symfony/http-foundation component
Installs: 1
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/coral-media/http-foundation
Requires
- php: ^7.4|^8.0
- ext-sodium: *
- symfony/http-foundation: ^5.3
Requires (Dev)
- symfony/phpunit-bridge: ^5.3
This package is auto-updated.
Last update: 2025-10-12 11:42:18 UTC
README
Intended to override and/or extend http-foundation component functionality in Symfony development environments.
Installation and configuration
Install this package using composer.
composer require coral-media/http-foundation
For further configuration check following sections.
The EncryptedSessionProxy
Provides session encrypting for our session handler. Example provided below shows how to implement it using PdoSessionhandler.
After installation set up your services.yaml as follows:
... Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler: arguments: - '%env(resolve:DATABASE_URL)%' session.handler.pdo: alias: 'Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler' CoralMedia\Component\HttpFoundation\Session\Storage\Proxy\EncryptedSessionProxy: arguments: - '@session.handler.pdo' - '%env(resolve:SESSION_ENCRYPTION_KEY)%' session.storage.proxy.encrypted: alias: 'CoralMedia\Component\HttpFoundation\Session\Storage\Proxy\EncryptedSessionProxy' ...
Dont forget to add your configuration in config/packages/framework.yaml
framework: ... session: handler_id: session.storage.proxy.encrypted cookie_secure: auto cookie_samesite: lax storage_factory_id: session.storage.factory.native save_path: '%kernel.cache_dir%/sessions' ...