From 6119b67194adb210f30c8875ac7dd3110d285284 Mon Sep 17 00:00:00 2001 From: Tobias Schultze Date: Sun, 1 Jul 2018 00:35:11 +0200 Subject: [PATCH 1/2] [Routing] do not install SensioFrameworkExtraBundle The routing annotations of SensioFrameworkExtraBundle are deprecate since https://github.com/sensiolabs/SensioFrameworkExtraBundle/pull/562 Also the example code in this documentation does not use SensioFrameworkExtraBundle at all but the core annotation as it should be. So installing the SensioFrameworkExtraBundle is pointless. --- routing.rst | 6 ------ 1 file changed, 6 deletions(-) diff --git a/routing.rst b/routing.rst index e9b9068547d..33c4cf56b25 100644 --- a/routing.rst +++ b/routing.rst @@ -20,12 +20,6 @@ the change is simple. Creating Routes --------------- -First, add support for annotations via the SensioFrameworkExtraBundle: - -.. code-block:: terminal - - $ composer require sensio/framework-extra-bundle - A *route* is a map from a URL path to a controller. Suppose you want one route that matches ``/blog`` exactly and another more dynamic route that can match *any* URL like ``/blog/my-post`` or ``/blog/all-about-symfony``: From c98babfa88282485de737b3cfe15b8fea8c82274 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Mon, 16 Jul 2018 20:42:30 +0200 Subject: [PATCH 2/2] Reword --- routing.rst | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/routing.rst b/routing.rst index 33c4cf56b25..d954ab694bb 100644 --- a/routing.rst +++ b/routing.rst @@ -22,7 +22,17 @@ Creating Routes A *route* is a map from a URL path to a controller. Suppose you want one route that matches ``/blog`` exactly and another more dynamic route that can match *any* URL -like ``/blog/my-post`` or ``/blog/all-about-symfony``: +like ``/blog/my-post`` or ``/blog/all-about-symfony``. + +Routes can be configured in YAML, XML and PHP. All formats provide the same +features and performance, so choose the one you prefer. If you choose PHP +annotations, run this command once in your app to add support for them: + +.. code-block:: terminal + + $ composer require annotations + +Now you can configure the routes: .. configuration-block::