From 93684e2c290bda41e4ec507df61872ca6f72c892 Mon Sep 17 00:00:00 2001
From: Philipp Rieber
Date: Thu, 25 Sep 2014 15:18:50 +0200
Subject: [PATCH] [Cookbook][External Parameters] Enhance description of
environment variables
---
cookbook/configuration/external_parameters.rst | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/cookbook/configuration/external_parameters.rst b/cookbook/configuration/external_parameters.rst
index 0f9c56501c5..58a72fd898c 100644
--- a/cookbook/configuration/external_parameters.rst
+++ b/cookbook/configuration/external_parameters.rst
@@ -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:
@@ -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
---------