From 7b99ede0dce7a4ac4a339520b282e27936c8b731 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Simon?= Date: Tue, 1 Oct 2013 18:21:39 +0200 Subject: [PATCH] [FrameworkBundle] updated XML route description --- .../FrameworkBundle/Console/Descriptor/XmlDescriptor.php | 6 ++++-- .../FrameworkBundle/Tests/Fixtures/Descriptor/route_1.xml | 3 ++- .../FrameworkBundle/Tests/Fixtures/Descriptor/route_2.xml | 3 ++- .../Tests/Fixtures/Descriptor/route_collection_1.xml | 6 ++++-- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php index d54a64e0edd7..535cf8ea1653 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php @@ -128,9 +128,11 @@ private function getRouteDocument(Route $route, $name = null) $routeXML->setAttribute('name', $name); } - $routeXML->setAttribute('path', $route->getPath()); $routeXML->setAttribute('class', get_class($route)); - $routeXML->setAttribute('path_regex', $route->compile()->getRegex()); + + $routeXML->appendChild($pathXML = $dom->createElement('path')); + $pathXML->setAttribute('regex', $route->compile()->getRegex()); + $pathXML->appendChild(new \DOMText($route->getPath())); if ('' !== $route->getHost()) { $routeXML->appendChild($hostXML = $dom->createElement('host')); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1.xml index 790320679de9..164282c5f69a 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1.xml @@ -1,5 +1,6 @@ - + + /hello/{name} localhost http https diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.xml index b8b6693b3bf6..333eeaa1b416 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.xml @@ -1,5 +1,6 @@ - + + /name/add localhost http https diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.xml index e68f29c552f6..aa5adb482aa7 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.xml @@ -1,6 +1,7 @@ - + + /hello/{name} localhost http https @@ -18,7 +19,8 @@ - + + /name/add localhost http https