Skip to content

Commit fda7eec

Browse files
committed
use valid XML in code block
1 parent e3f229d commit fda7eec

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

book/service_container.rst

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,18 @@ parameter and uses it in the service definition.
269269

270270
.. code-block:: xml
271271
272-
<argument type="string">http://symfony.com/?foo=%%s&bar=%%d</argument>
272+
<?xml version="1.0" encoding="UTF-8" ?>
273+
<container xmlns="http://symfony.com/schema/dic/services"
274+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
275+
xsi:schemaLocation="http://symfony.com/schema/dic/services
276+
http://symfony.com/schema/dic/services/services-1.0.xsd">
277+
278+
<services>
279+
<service id="app.foo" class="AppBundle\Foo">
280+
<argument type="string"><![CDATA[http://symfony.com/?foo=%%s&bar=%%d]]></argument>
281+
</service>
282+
</services>
283+
</container>
273284
274285
.. caution::
275286

components/dependency_injection/parameters.rst

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,18 @@ the parameter value in one place if needed.
155155
156156
.. code-block:: xml
157157
158-
<argument>http://symfony.com/?foo=%%s&bar=%%d</argument>
158+
<?xml version="1.0" encoding="UTF-8" ?>
159+
<container xmlns="http://symfony.com/schema/dic/services"
160+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
161+
xsi:schemaLocation="http://symfony.com/schema/dic/services
162+
http://symfony.com/schema/dic/services/services-1.0.xsd">
163+
164+
<services>
165+
<service id="app.foo" class="AppBundle\Foo">
166+
<argument type="string"><![CDATA[http://symfony.com/?foo=%%s&bar=%%d]]></argument>
167+
</service>
168+
</services>
169+
</container>
159170
160171
.. code-block:: php
161172

components/intl.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ code::
126126

127127
.. code-block:: json
128128
129-
"require: {
129+
"require": {
130130
"symfony/icu": "1.1.*"
131131
}
132132

0 commit comments

Comments
 (0)