File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
components/dependency_injection Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,27 @@ rather than being tied up and hidden with the service definition:
97
97
->register('mailer', 'Mailer')
98
98
->addArgument('%mailer.transport%');
99
99
100
+ .. caution ::
101
+
102
+ The values between ``parameter `` tags in XML configuration files are not
103
+ trimmed.
104
+
105
+ This means that the following configuration sample will have the value
106
+ ``\n sendmail\n ``:
107
+
108
+ .. code-block :: xml
109
+
110
+ <parameter key =" mailer.transport" >
111
+ sendmail
112
+ </parameter >
113
+
114
+ In some cases (for constants or class names), this could throw errors. In
115
+ order to prevent this, you must always inline your parameters as follow:
116
+
117
+ .. code-block :: xml
118
+
119
+ <parameter key =" mailer.transport" >sendmail</parameter >
120
+
100
121
If you were using this elsewhere as well, then you would only need to change
101
122
the parameter value in one place if needed.
102
123
You can’t perform that action at this time.
0 commit comments