Skip to content

Commit

Permalink
feature #4269 [Cookbook][External Parameters] Enhance content (bicpi)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.3 branch.

Discussion
----------

[Cookbook][External Parameters] Enhance content

Enhance description of environment variables used as container parameters

| Q             | A
| ------------- | ---
| Doc fix?      | no
| New docs?     | no
| Applies to    | all
| Fixed tickets | -

Commits
-------

93684e2 [Cookbook][External Parameters] Enhance description of environment variables
  • Loading branch information
weaverryan committed Oct 15, 2014
2 parents 69bfac1 + 93684e2 commit 3b6c2b9
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions cookbook/configuration/external_parameters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@ Environment Variables
---------------------

Symfony will grab any environment variable prefixed with ``SYMFONY__`` and
set it as a parameter in the service container. Double underscores are replaced
with a period, as a period is not a valid character in an environment variable
name.
set it as a parameter in the service container. Some transformations are
applied to the resulting parameter name:

* ``SYMFONY__`` prefix is removed;
* Parameter name is lowercased;
* Double underscores are replaced with a period, as a period is not
a valid character in an environment variable name.

For example, if you're using Apache, environment variables can be set using
the following ``VirtualHost`` configuration:
Expand Down Expand Up @@ -94,6 +98,14 @@ You can now reference these parameters wherever you need them.
)
));
.. note::

Even in debug mode, setting or changing an environment variable
requires your cache to be cleared to make the parameter available.
In debug mode, this is required since only a change to a configuration
file that is loaded by Symfony triggers your configuration to be
re-evaluated.

Constants
---------

Expand Down

0 comments on commit 3b6c2b9

Please sign in to comment.