Skip to content

Commit 17251d0

Browse files
committed
[Cache] Fix service declarations in PHP and XML for encrypted secrets
1 parent dad2982 commit 17251d0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cache.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -755,8 +755,7 @@ And add it to your :doc:`secret store </configuration/secrets>` as
755755
https://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
756756
757757
<services>
758-
<service id="Symfony\Component\Cache\Marshaller\SodiumMarshaller">
759-
<factory class="Symfony\Component\Cache\Adapter\RedisAdapter" method="createConnection"/>
758+
<service id="Symfony\Component\Cache\Marshaller\SodiumMarshaller" decorates="cache.default_marshaller">
760759
<argument>redis://localhost</argument>
761760
<argument type="collection">
762761
<argument>env(base64:CACHE_DECRYPTION_KEY)</argument>
@@ -772,6 +771,7 @@ And add it to your :doc:`secret store </configuration/secrets>` as
772771
use Symfony\Component\Cache\Marshaller\SodiumMarshaller;
773772
774773
$container->register(SodiumMarshaller::class)
774+
->decorate('cache.default_marshaller')
775775
->addArgument(['env(base64:CACHE_DECRYPTION_KEY)'])
776776
->addArgument(service('@Symfony\Component\Cache\Marshaller\SodiumMarshaller.inner'));
777777
@@ -807,8 +807,7 @@ for reading and writing, and the additional key(s) will only be used for reading
807807
https://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
808808
809809
<services>
810-
<service id="Symfony\Component\Cache\Marshaller\SodiumMarshaller">
811-
<factory class="Symfony\Component\Cache\Adapter\RedisAdapter" method="createConnection"/>
810+
<service id="Symfony\Component\Cache\Marshaller\SodiumMarshaller" decorates="cache.default_marshaller">
812811
<argument>redis://localhost</argument>
813812
<argument type="collection">
814813
<argument>env(base64:CACHE_DECRYPTION_KEY)</argument>
@@ -825,6 +824,7 @@ for reading and writing, and the additional key(s) will only be used for reading
825824
use Symfony\Component\Cache\Marshaller\SodiumMarshaller;
826825
827826
$container->register(SodiumMarshaller::class)
827+
->decorate('cache.default_marshaller')
828828
->addArgument(['env(base64:CACHE_DECRYPTION_KEY)', 'env(base64:OLD_CACHE_DECRYPTION_KEY)'])
829829
->addArgument(service('@Symfony\Component\Cache\Marshaller\SodiumMarshaller.inner'));
830830

0 commit comments

Comments
 (0)