Skip to content

Commit 5c2f4d5

Browse files
committed
[#10099] update XML and PHP config examples
1 parent eafd60e commit 5c2f4d5

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

controller/argument_value_resolver.rst

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,28 @@ type-hinted method arguments:
8787
8888
.. code-block:: xml
8989
90-
<sensio-framework-extra:config>
91-
<request converters="true" auto-convert="true" />
92-
</sensio-framework-extra:config>
90+
<!-- app/config/config.xml -->
91+
<?xml version="1.0" encoding="UTF-8" ?>
92+
<container xmlns="http://symfony.com/schema/dic/services"
93+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
94+
xmlns:sensio-framework-extra="http://symfony.com/schema/dic/symfony_extra"
95+
xsi:schemaLocation="http://symfony.com/schema/dic/services
96+
http://symfony.com/schema/dic/services/services-1.0.xsd">
97+
98+
<sensio-framework-extra:config>
99+
<request converters="true" auto-convert="false" />
100+
</sensio-framework-extra:config>
101+
</container>
102+
103+
.. code-block:: php
104+
105+
// app/config/config.php
106+
$container->loadFromExtension('sensio_framework_extra', array(
107+
'request' => array(
108+
'converters' => true,
109+
'auto_convert' => false,
110+
),
111+
));
93112
94113
Adding a new value resolver requires creating a class that implements
95114
:class:`Symfony\\Component\\HttpKernel\\Controller\\ArgumentValueResolverInterface`

0 commit comments

Comments
 (0)