Skip to content

Mention the service tag of env processors #10553

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 26, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions configuration/external_parameters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,7 @@ Custom Environment Variable Processors

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

use Symfony\Component\DependencyInjection\EnvVarProcessorInterface;

Expand All @@ -493,6 +492,12 @@ then, define a service for that class::
}
}

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

Constants
---------

Expand Down