From 041df67bb77d42b05d6714f6d7694536ab29ff0d Mon Sep 17 00:00:00 2001 From: WouterJ Date: Thu, 13 Jun 2013 17:59:31 +0200 Subject: [PATCH] Fixed deprecated route methods --- book/routing.rst | 6 +++++- cookbook/routing/service_container_parameters.rst | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/book/routing.rst b/book/routing.rst index 09ebf2d94d8..dd69eb1ba9f 100644 --- a/book/routing.rst +++ b/book/routing.rst @@ -1026,7 +1026,11 @@ instead of simply ``/hello/{name}``: use Symfony\Component\Routing\RouteCollection; $collection = new RouteCollection(); - $collection->addCollection($loader->import("@AcmeHelloBundle/Resources/config/routing.php"), '/admin'); + + $acmeHello = $loader->import("@AcmeHelloBundle/Resources/config/routing.php"); + $acmeHello->setPrefix('/admin'); + + $collection->addCollection($acmeHello); return $collection; diff --git a/cookbook/routing/service_container_parameters.rst b/cookbook/routing/service_container_parameters.rst index 8b6d100e264..d7dbd5a6199 100644 --- a/cookbook/routing/service_container_parameters.rst +++ b/cookbook/routing/service_container_parameters.rst @@ -75,7 +75,7 @@ in your container: .. code-block:: php - # app/config/config.php + // app/config/config.php $container->setParameter('acme_demo.locales', 'en|es'); You can also use a parameter to define your route path (or part of your