Skip to content

Commit 041df67

Browse files
committed
Fixed deprecated route methods
1 parent 28f4ae7 commit 041df67

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

book/routing.rst

+5-1
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,11 @@ instead of simply ``/hello/{name}``:
10261026
use Symfony\Component\Routing\RouteCollection;
10271027
10281028
$collection = new RouteCollection();
1029-
$collection->addCollection($loader->import("@AcmeHelloBundle/Resources/config/routing.php"), '/admin');
1029+
1030+
$acmeHello = $loader->import("@AcmeHelloBundle/Resources/config/routing.php");
1031+
$acmeHello->setPrefix('/admin');
1032+
1033+
$collection->addCollection($acmeHello);
10301034
10311035
return $collection;
10321036

cookbook/routing/service_container_parameters.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ in your container:
7575
7676
.. code-block:: php
7777
78-
# app/config/config.php
78+
// app/config/config.php
7979
$container->setParameter('acme_demo.locales', 'en|es');
8080
8181
You can also use a parameter to define your route path (or part of your

0 commit comments

Comments
 (0)