File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -231,6 +231,24 @@ looks up the value of each parameter and uses it in the service definition.
231
231
232
232
<argument type =" string" >http://symfony.com/?foo=%%s& bar=%%d</argument >
233
233
234
+ .. versionadded :: 2.1
235
+ Escaping the ``@ `` character in YAML parameter values is new in Symfony 2.1.9
236
+ and Symfony 2.2.1.
237
+
238
+ .. note ::
239
+
240
+ If you want to use a string that starts with an ``@ `` sign as a parameter
241
+ value (i.e. a very safe mailer password) in a yaml file, you need to escape
242
+ it by adding another ``@ `` sign (This only applies to the YAML format):
243
+
244
+ .. code-block :: yaml
245
+
246
+ # app/config/parameters.yml
247
+ parameters :
248
+ # This will be parsed as string "@securepass"
249
+ mailer_password : " @@securepass"
250
+
251
+
234
252
The purpose of parameters is to feed information into services. Of course
235
253
there was nothing wrong with defining the service without using any parameters.
236
254
Parameters, however, have several advantages:
You can’t perform that action at this time.
0 commit comments