Skip to content

Commit 0ac91c7

Browse files
committed
minor #10553 Mention the service tag of env processors (javiereguiluz)
This PR was merged into the 4.1 branch. Discussion ---------- Mention the service tag of env processors This continues the improvements of #10549. Commits ------- 69f84e2 Mention the service tag of env processors
2 parents 4f9ad67 + 69f84e2 commit 0ac91c7

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

configuration/external_parameters.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,8 +471,7 @@ Custom Environment Variable Processors
471471

472472
It's also possible to add your own processors for environment variables. First,
473473
create a class that implements
474-
:class:`Symfony\\Component\\DependencyInjection\\EnvVarProcessorInterface` and
475-
then, define a service for that class::
474+
:class:`Symfony\\Component\\DependencyInjection\\EnvVarProcessorInterface`::
476475

477476
use Symfony\Component\DependencyInjection\EnvVarProcessorInterface;
478477

@@ -493,6 +492,12 @@ then, define a service for that class::
493492
}
494493
}
495494

495+
To enable the new processor in the app, register it as a service and
496+
:doc:`tag it </service_container/tags>` with the ``container.env_var_processor``
497+
tag. If you're using the
498+
:ref:`default services.yaml configuration <service-container-services-load-example>`,
499+
this is already done for you, thanks to :ref:`autoconfiguration <services-autoconfigure>`.
500+
496501
Constants
497502
---------
498503

0 commit comments

Comments
 (0)