File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -227,6 +227,23 @@ The end result is exactly the same as before - the difference is only in
227
227
to look for parameters with those names. When the container is built, it
228
228
looks up the value of each parameter and uses it in the service definition.
229
229
230
+ .. versionadded :: 2.1
231
+ Escaping the ``@ `` character in YAML parameter values is new in Symfony 2.1.9
232
+ and Symfony 2.2.1.
233
+
234
+ .. note ::
235
+
236
+ If you want to use a string that starts with an ``@ `` sign as a parameter
237
+ value (i.e. a very safe mailer password) in a yaml file, you need to escape
238
+ it by adding another ``@ `` sign (This only applies to the YAML format):
239
+
240
+ .. code-block :: yaml
241
+
242
+ # app/config/parameters.yml
243
+ parameters :
244
+ # This will be parsed as string "@securepass"
245
+ mailer_password : " @@securepass"
246
+
230
247
The purpose of parameters is to feed information into services. Of course
231
248
there was nothing wrong with defining the service without using any parameters.
232
249
Parameters, however, have several advantages:
You can’t perform that action at this time.
0 commit comments