Skip to content

Commit 70a7f24

Browse files
committed
Merge branch '3.4' into 4.2
* 3.4: Added some missing info in the article about container params in routes
2 parents 9d60165 + c557dac commit 70a7f24

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

routing/service_container_parameters.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,36 @@ path):
162162
;
163163
};
164164
165+
Now make sure that the ``app.route_prefix`` parameter is set somewhere in your
166+
container:
167+
168+
.. configuration-block::
169+
170+
.. code-block:: yaml
171+
172+
# app/config/config.yml
173+
parameters:
174+
app.route_prefix: 'foo'
175+
176+
.. code-block:: xml
177+
178+
<!-- app/config/config.xml -->
179+
<?xml version="1.0" charset="UTF-8" ?>
180+
<container xmlns="http://symfony.com/schema/dic/services"
181+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
182+
xsi:schemaLocation="http://symfony.com/schema/dic/services
183+
https://symfony.com/schema/dic/services/services-1.0.xsd">
184+
185+
<parameters>
186+
<parameter key="app.route_prefix">foo</parameter>
187+
</parameters>
188+
</container>
189+
190+
.. code-block:: php
191+
192+
// app/config/config.php
193+
$container->setParameter('app.route_prefix', 'foo');
194+
165195
.. note::
166196

167197
Just like in normal service container configuration files, if you actually

0 commit comments

Comments
 (0)