jsq / doctrine-cache-encrypter-bundle
A bundle to manage encryption for your doctrine caches
Requires
- php: >=5.5
- jsq/doctrine-cache-encrypter: ~0.3.0
- symfony/dependency-injection: ~2.6|~3.0
- symfony/http-kernel: ~2.6|~3.0
Requires (Dev)
- phpunit/phpunit: ^4.8
- symfony/framework-bundle: ~2.6|~3.0
This package is auto-updated.
Last update: 2024-10-29 05:10:27 UTC
README
The purpose of this bundle is to provide a thin wrapper around the Doctrine Cache Encrypter to make it work more seamlessly with the Symfony framework. This bundle will allow you to create an encrypted cache service from a regular Doctrine Cache service by tagging it.
Usage
Any service that is an instance of Doctrine\Common\Cache\Cache
can be tagged
with the cache.encrypted
tag to create an additional service that will encrypt
values either with a password or against an array of public keys.
Sample configuration can be found in the tests/fixtures
folder for YAML, PHP, and XML.
To use a service for any configuration value, use @
followed by the service
name, such as @a_service
. This syntax will be converted to a service during
container compilation. If you want to use a string literal that begins with @
,
you will need to escape it by adding another @
sign.
Please note that you will need to pass in an array of public keys, not just a
single one, as that encrypter is designed to work across multiple servers, each
with its own key pair. As Symfony DI tags can only be string values, you will
need to use a service (with @service
notation) that returns an array.