From a21c1127dc18553a729da0aa925fa24186a57488 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Sun, 12 Apr 2020 11:58:27 +0200 Subject: [PATCH] =?UTF-8?q?[Routing]=20=C2=B5tweaks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Symfony/Component/Routing/Loader/ObjectRouteLoader.php | 2 +- src/Symfony/Component/Routing/Loader/XmlFileLoader.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Routing/Loader/ObjectRouteLoader.php b/src/Symfony/Component/Routing/Loader/ObjectRouteLoader.php index 3920fc4bef..65633ca075 100644 --- a/src/Symfony/Component/Routing/Loader/ObjectRouteLoader.php +++ b/src/Symfony/Component/Routing/Loader/ObjectRouteLoader.php @@ -67,7 +67,7 @@ abstract class ObjectRouteLoader extends Loader if (!$routeCollection instanceof RouteCollection) { $type = \is_object($routeCollection) ? \get_class($routeCollection) : \gettype($routeCollection); - throw new \LogicException(sprintf('The "%s"::%s method must return a RouteCollection: "%s" returned.', \get_class($loaderObject), $method, $type)); + throw new \LogicException(sprintf('The "%s::%s()" method must return a RouteCollection: "%s" returned.', \get_class($loaderObject), $method, $type)); } // make the service file tracked so that if it changes, the cache rebuilds diff --git a/src/Symfony/Component/Routing/Loader/XmlFileLoader.php b/src/Symfony/Component/Routing/Loader/XmlFileLoader.php index 29dfdb1665..a9a9d09e08 100644 --- a/src/Symfony/Component/Routing/Loader/XmlFileLoader.php +++ b/src/Symfony/Component/Routing/Loader/XmlFileLoader.php @@ -240,9 +240,9 @@ class XmlFileLoader extends FileLoader if ($controller = $node->getAttribute('controller')) { if (isset($defaults['_controller'])) { - $name = $node->hasAttribute('id') ? sprintf('"%s"', $node->getAttribute('id')) : sprintf('the "%s" tag', $node->tagName); + $name = $node->hasAttribute('id') ? sprintf('"%s".', $node->getAttribute('id')) : sprintf('the "%s" tag.', $node->tagName); - throw new \InvalidArgumentException(sprintf('The routing file "%s" must not specify both the "controller" attribute and the defaults key "_controller" for %s.', $path, $name)); + throw new \InvalidArgumentException(sprintf('The routing file "%s" must not specify both the "controller" attribute and the defaults key "_controller" for ', $path).$name); } $defaults['_controller'] = $controller;