Commit 7c58d4e2 authored by webchick's avatar webchick

Issue #2105821 by cosmicdreams: Fixed Updated Symfony CMF's Routing Component to v1.1.0 .

parent 73f2d97f
...@@ -1157,27 +1157,32 @@ ...@@ -1157,27 +1157,32 @@
}, },
{ {
"name": "symfony-cmf/routing", "name": "symfony-cmf/routing",
"version": "1.1.0-beta1", "version": "1.1.0",
"target-dir": "Symfony/Cmf/Component/Routing", "target-dir": "Symfony/Cmf/Component/Routing",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony-cmf/Routing.git", "url": "https://github.com/symfony-cmf/Routing.git",
"reference": "1.1.0-beta1" "reference": "9f8607950cbf888ec678713a35f3d0088857c85f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony-cmf/Routing/zipball/1.1.0-beta1", "url": "https://api.github.com/repos/symfony-cmf/Routing/zipball/9f8607950cbf888ec678713a35f3d0088857c85f",
"reference": "1.1.0-beta1", "reference": "9f8607950cbf888ec678713a35f3d0088857c85f",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3", "php": ">=5.3.3",
"psr/log": ">=1.0,<2.0", "psr/log": "~1.0",
"symfony/http-kernel": ">=2.2,<3.0", "symfony/http-kernel": "~2.2",
"symfony/routing": ">=2.2,<3.0" "symfony/routing": "~2.2"
},
"require-dev": {
"symfony/config": "~2.2",
"symfony/dependency-injection": "~2.0",
"symfony/event-dispatcher": "~2.1"
}, },
"suggest": { "suggest": {
"symfony/http-foundation": "ChainRouter/DynamicRouter have optional support for Request instances, several enhancers require a Request instances, ~2.2" "symfony/event-dispatcher": "DynamicRouter can optionally trigger an event at the start of matching. Minimal version ~2.1"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
...@@ -1206,7 +1211,7 @@ ...@@ -1206,7 +1211,7 @@
"database", "database",
"routing" "routing"
], ],
"time": "2013-06-03 17:23:01" "time": "2013-10-14 15:32:46"
}, },
{ {
"name": "symfony/class-loader", "name": "symfony/class-loader",
......
<?php <?php
// autoload.php @generated by Composer // autoload.php generated by Composer
require_once __DIR__ . '/composer' . '/autoload_real.php'; require_once __DIR__ . '/composer' . '/autoload_real.php';
return ComposerAutoloaderInit7ffa68419492d19fe654de54c86ae5d2::getLoader(); return ComposerAutoloaderInit2f086fd5a6ac4778e93c60384b7d424a::getLoader();
...@@ -49,7 +49,7 @@ class ClassLoader ...@@ -49,7 +49,7 @@ class ClassLoader
public function getPrefixes() public function getPrefixes()
{ {
return call_user_func_array('array_merge', $this->prefixes); return $this->prefixes;
} }
public function getFallbackDirs() public function getFallbackDirs()
...@@ -98,21 +98,19 @@ public function add($prefix, $paths, $prepend = false) ...@@ -98,21 +98,19 @@ public function add($prefix, $paths, $prepend = false)
return; return;
} }
if (!isset($this->prefixes[$prefix])) {
$first = $prefix[0]; $this->prefixes[$prefix] = (array) $paths;
if (!isset($this->prefixes[$first][$prefix])) {
$this->prefixes[$first][$prefix] = (array) $paths;
return; return;
} }
if ($prepend) { if ($prepend) {
$this->prefixes[$first][$prefix] = array_merge( $this->prefixes[$prefix] = array_merge(
(array) $paths, (array) $paths,
$this->prefixes[$first][$prefix] $this->prefixes[$prefix]
); );
} else { } else {
$this->prefixes[$first][$prefix] = array_merge( $this->prefixes[$prefix] = array_merge(
$this->prefixes[$first][$prefix], $this->prefixes[$prefix],
(array) $paths (array) $paths
); );
} }
...@@ -121,8 +119,8 @@ public function add($prefix, $paths, $prepend = false) ...@@ -121,8 +119,8 @@ public function add($prefix, $paths, $prepend = false)
/** /**
* Registers a set of classes, replacing any others previously set. * Registers a set of classes, replacing any others previously set.
* *
* @param string $prefix The classes prefix * @param string $prefix The classes prefix
* @param array|string $paths The location(s) of the classes * @param array|string $paths The location(s) of the classes
*/ */
public function set($prefix, $paths) public function set($prefix, $paths)
{ {
...@@ -131,7 +129,7 @@ public function set($prefix, $paths) ...@@ -131,7 +129,7 @@ public function set($prefix, $paths)
return; return;
} }
$this->prefixes[substr($prefix, 0, 1)][$prefix] = (array) $paths; $this->prefixes[$prefix] = (array) $paths;
} }
/** /**
...@@ -197,7 +195,6 @@ public function loadClass($class) ...@@ -197,7 +195,6 @@ public function loadClass($class)
*/ */
public function findFile($class) public function findFile($class)
{ {
// work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
if ('\\' == $class[0]) { if ('\\' == $class[0]) {
$class = substr($class, 1); $class = substr($class, 1);
} }
...@@ -208,7 +205,7 @@ public function findFile($class) ...@@ -208,7 +205,7 @@ public function findFile($class)
if (false !== $pos = strrpos($class, '\\')) { if (false !== $pos = strrpos($class, '\\')) {
// namespaced class name // namespaced class name
$classPath = strtr(substr($class, 0, $pos), '\\', DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; $classPath = str_replace('\\', DIRECTORY_SEPARATOR, substr($class, 0, $pos)) . DIRECTORY_SEPARATOR;
$className = substr($class, $pos + 1); $className = substr($class, $pos + 1);
} else { } else {
// PEAR-like class name // PEAR-like class name
...@@ -216,16 +213,13 @@ public function findFile($class) ...@@ -216,16 +213,13 @@ public function findFile($class)
$className = $class; $className = $class;
} }
$classPath .= strtr($className, '_', DIRECTORY_SEPARATOR) . '.php'; $classPath .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php';
$first = $class[0]; foreach ($this->prefixes as $prefix => $dirs) {
if (isset($this->prefixes[$first])) { if (0 === strpos($class, $prefix)) {
foreach ($this->prefixes[$first] as $prefix => $dirs) { foreach ($dirs as $dir) {
if (0 === strpos($class, $prefix)) { if (file_exists($dir . DIRECTORY_SEPARATOR . $classPath)) {
foreach ($dirs as $dir) { return $dir . DIRECTORY_SEPARATOR . $classPath;
if (file_exists($dir . DIRECTORY_SEPARATOR . $classPath)) {
return $dir . DIRECTORY_SEPARATOR . $classPath;
}
} }
} }
} }
......
<?php <?php
// autoload_classmap.php @generated by Composer // autoload_classmap.php generated by Composer
$vendorDir = dirname(dirname(__FILE__)); $vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname(dirname($vendorDir)); $baseDir = dirname(dirname($vendorDir));
......
<?php <?php
// autoload_namespaces.php @generated by Composer // autoload_namespaces.php generated by Composer
$vendorDir = dirname(dirname(__FILE__)); $vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname(dirname($vendorDir)); $baseDir = dirname(dirname($vendorDir));
return array( return array(
'Zend\\Stdlib\\' => array($vendorDir . '/zendframework/zend-stdlib'), 'Zend\\Stdlib\\' => $vendorDir . '/zendframework/zend-stdlib',
'Zend\\Feed\\' => array($vendorDir . '/zendframework/zend-feed'), 'Zend\\Feed\\' => $vendorDir . '/zendframework/zend-feed',
'Zend\\Escaper\\' => array($vendorDir . '/zendframework/zend-escaper'), 'Zend\\Escaper\\' => $vendorDir . '/zendframework/zend-escaper',
'Twig_' => array($vendorDir . '/twig/twig/lib'), 'Twig_' => $vendorDir . '/twig/twig/lib',
'Symfony\\Component\\Yaml\\' => array($vendorDir . '/symfony/yaml'), 'Symfony\\Component\\Yaml\\' => $vendorDir . '/symfony/yaml',
'Symfony\\Component\\Validator\\' => array($vendorDir . '/symfony/validator'), 'Symfony\\Component\\Validator\\' => $vendorDir . '/symfony/validator',
'Symfony\\Component\\Translation\\' => array($vendorDir . '/symfony/translation'), 'Symfony\\Component\\Translation\\' => $vendorDir . '/symfony/translation',
'Symfony\\Component\\Serializer\\' => array($vendorDir . '/symfony/serializer'), 'Symfony\\Component\\Serializer\\' => $vendorDir . '/symfony/serializer',
'Symfony\\Component\\Routing\\' => array($vendorDir . '/symfony/routing'), 'Symfony\\Component\\Routing\\' => $vendorDir . '/symfony/routing',
'Symfony\\Component\\Process\\' => array($vendorDir . '/symfony/process'), 'Symfony\\Component\\Process\\' => $vendorDir . '/symfony/process',
'Symfony\\Component\\HttpKernel\\' => array($vendorDir . '/symfony/http-kernel'), 'Symfony\\Component\\HttpKernel\\' => $vendorDir . '/symfony/http-kernel',
'Symfony\\Component\\HttpFoundation\\' => array($vendorDir . '/symfony/http-foundation'), 'Symfony\\Component\\HttpFoundation\\' => $vendorDir . '/symfony/http-foundation',
'Symfony\\Component\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher'), 'Symfony\\Component\\EventDispatcher\\' => $vendorDir . '/symfony/event-dispatcher',
'Symfony\\Component\\DependencyInjection\\' => array($vendorDir . '/symfony/dependency-injection'), 'Symfony\\Component\\DependencyInjection\\' => $vendorDir . '/symfony/dependency-injection',
'Symfony\\Component\\Debug\\' => array($vendorDir . '/symfony/debug'), 'Symfony\\Component\\Debug\\' => $vendorDir . '/symfony/debug',
'Symfony\\Component\\ClassLoader\\' => array($vendorDir . '/symfony/class-loader'), 'Symfony\\Component\\ClassLoader\\' => $vendorDir . '/symfony/class-loader',
'Symfony\\Cmf\\Component\\Routing' => array($vendorDir . '/symfony-cmf/routing'), 'Symfony\\Cmf\\Component\\Routing' => $vendorDir . '/symfony-cmf/routing',
'Psr\\Log\\' => array($vendorDir . '/psr/log'), 'Psr\\Log\\' => $vendorDir . '/psr/log',
'Guzzle\\Stream' => array($vendorDir . '/guzzle/stream'), 'Guzzle\\Stream' => $vendorDir . '/guzzle/stream',
'Guzzle\\Parser' => array($vendorDir . '/guzzle/parser'), 'Guzzle\\Parser' => $vendorDir . '/guzzle/parser',
'Guzzle\\Http' => array($vendorDir . '/guzzle/http'), 'Guzzle\\Http' => $vendorDir . '/guzzle/http',
'Guzzle\\Common' => array($vendorDir . '/guzzle/common'), 'Guzzle\\Common' => $vendorDir . '/guzzle/common',
'Gliph' => array($vendorDir . '/sdboyer/gliph/src'), 'Gliph' => $vendorDir . '/sdboyer/gliph/src',
'EasyRdf_' => array($vendorDir . '/easyrdf/easyrdf/lib'), 'EasyRdf_' => $vendorDir . '/easyrdf/easyrdf/lib',
'Drupal\\Driver' => array($baseDir . '/drivers/lib'), 'Drupal\\Driver' => $baseDir . '/drivers/lib',
'Drupal\\Core' => array($baseDir . '/core/lib'), 'Drupal\\Core' => $baseDir . '/core/lib',
'Drupal\\Component' => array($baseDir . '/core/lib'), 'Drupal\\Component' => $baseDir . '/core/lib',
'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/lib'), 'Doctrine\\Common\\Lexer\\' => $vendorDir . '/doctrine/lexer/lib',
'Doctrine\\Common\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib'), 'Doctrine\\Common\\Inflector\\' => $vendorDir . '/doctrine/inflector/lib',
'Doctrine\\Common\\Collections\\' => array($vendorDir . '/doctrine/collections/lib'), 'Doctrine\\Common\\Collections\\' => $vendorDir . '/doctrine/collections/lib',
'Doctrine\\Common\\Cache\\' => array($vendorDir . '/doctrine/cache/lib'), 'Doctrine\\Common\\Cache\\' => $vendorDir . '/doctrine/cache/lib',
'Doctrine\\Common\\Annotations\\' => array($vendorDir . '/doctrine/annotations/lib'), 'Doctrine\\Common\\Annotations\\' => $vendorDir . '/doctrine/annotations/lib',
'Doctrine\\Common\\' => array($vendorDir . '/doctrine/common/lib'), 'Doctrine\\Common\\' => $vendorDir . '/doctrine/common/lib',
'Assetic' => array($vendorDir . '/kriswallsmith/assetic/src'), 'Assetic' => $vendorDir . '/kriswallsmith/assetic/src',
); );
<?php <?php
// autoload_real.php @generated by Composer // autoload_real.php generated by Composer
class ComposerAutoloaderInit7ffa68419492d19fe654de54c86ae5d2 class ComposerAutoloaderInit2f086fd5a6ac4778e93c60384b7d424a
{ {
private static $loader; private static $loader;
...@@ -19,9 +19,9 @@ public static function getLoader() ...@@ -19,9 +19,9 @@ public static function getLoader()
return self::$loader; return self::$loader;
} }
spl_autoload_register(array('ComposerAutoloaderInit7ffa68419492d19fe654de54c86ae5d2', 'loadClassLoader'), true, true); spl_autoload_register(array('ComposerAutoloaderInit2f086fd5a6ac4778e93c60384b7d424a', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(); self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit7ffa68419492d19fe654de54c86ae5d2', 'loadClassLoader')); spl_autoload_unregister(array('ComposerAutoloaderInit2f086fd5a6ac4778e93c60384b7d424a', 'loadClassLoader'));
$vendorDir = dirname(__DIR__); $vendorDir = dirname(__DIR__);
$baseDir = dirname(dirname($vendorDir)); $baseDir = dirname(dirname($vendorDir));
...@@ -32,7 +32,7 @@ public static function getLoader() ...@@ -32,7 +32,7 @@ public static function getLoader()
$map = require __DIR__ . '/autoload_namespaces.php'; $map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) { foreach ($map as $namespace => $path) {
$loader->set($namespace, $path); $loader->add($namespace, $path);
} }
$classMap = require __DIR__ . '/autoload_classmap.php'; $classMap = require __DIR__ . '/autoload_classmap.php';
...@@ -42,10 +42,8 @@ public static function getLoader() ...@@ -42,10 +42,8 @@ public static function getLoader()
$loader->register(true); $loader->register(true);
$includeFiles = require __DIR__ . '/autoload_files.php'; require $vendorDir . '/kriswallsmith/assetic/src/functions.php';
foreach ($includeFiles as $file) { require $baseDir . '/core/lib/Drupal.php';
require $file;
}
return $loader; return $loader;
} }
......
<?php <?php
// include_paths.php @generated by Composer // include_paths.php generated by Composer
$vendorDir = dirname(dirname(__FILE__)); $vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname(dirname($vendorDir)); $baseDir = dirname(dirname($vendorDir));
......
...@@ -219,61 +219,6 @@ ...@@ -219,61 +219,6 @@
"minification" "minification"
] ]
}, },
{
"name": "symfony-cmf/routing",
"version": "1.1.0-beta1",
"version_normalized": "1.1.0.0-beta1",
"target-dir": "Symfony/Cmf/Component/Routing",
"source": {
"type": "git",
"url": "https://github.com/symfony-cmf/Routing.git",
"reference": "1.1.0-beta1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony-cmf/Routing/zipball/1.1.0-beta1",
"reference": "1.1.0-beta1",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"psr/log": ">=1.0,<2.0",
"symfony/http-kernel": ">=2.2,<3.0",
"symfony/routing": ">=2.2,<3.0"
},
"suggest": {
"symfony/http-foundation": "ChainRouter/DynamicRouter have optional support for Request instances, several enhancers require a Request instances, ~2.2"
},
"time": "2013-06-03 17:23:01",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.1-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-0": {
"Symfony\\Cmf\\Component\\Routing": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony CMF Community",
"homepage": "https://github.com/symfony-cmf/Routing/contributors"
}
],
"description": "Extends the Symfony2 routing component for dynamic routes and chaining several routers",
"homepage": "http://cmf.symfony.com",
"keywords": [
"database",
"routing"
]
},
{ {
"name": "phpunit/php-text-template", "name": "phpunit/php-text-template",
"version": "1.1.4", "version": "1.1.4",
...@@ -2110,5 +2055,65 @@ ...@@ -2110,5 +2055,65 @@
"php", "php",
"spl" "spl"
] ]
},
{
"name": "symfony-cmf/routing",
"version": "1.1.0",
"version_normalized": "1.1.0.0",
"target-dir": "Symfony/Cmf/Component/Routing",
"source": {
"type": "git",
"url": "https://github.com/symfony-cmf/Routing.git",
"reference": "9f8607950cbf888ec678713a35f3d0088857c85f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony-cmf/Routing/zipball/9f8607950cbf888ec678713a35f3d0088857c85f",
"reference": "9f8607950cbf888ec678713a35f3d0088857c85f",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"psr/log": "~1.0",
"symfony/http-kernel": "~2.2",
"symfony/routing": "~2.2"
},
"require-dev": {
"symfony/config": "~2.2",
"symfony/dependency-injection": "~2.0",
"symfony/event-dispatcher": "~2.1"
},
"suggest": {
"symfony/event-dispatcher": "DynamicRouter can optionally trigger an event at the start of matching. Minimal version ~2.1"
},
"time": "2013-10-14 15:32:46",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.1-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-0": {
"Symfony\\Cmf\\Component\\Routing": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony CMF Community",
"homepage": "https://github.com/symfony-cmf/Routing/contributors"
}
],
"description": "Extends the Symfony2 routing component for dynamic routes and chaining several routers",
"homepage": "http://cmf.symfony.com",
"keywords": [
"database",
"routing"
]
} }
] ]
...@@ -3,6 +3,7 @@ language: php ...@@ -3,6 +3,7 @@ language: php
php: php:
- 5.3 - 5.3
- 5.4 - 5.4
- 5.5
env: env:
- SYMFONY_VERSION=2.2.* - SYMFONY_VERSION=2.2.*
...@@ -10,11 +11,14 @@ env: ...@@ -10,11 +11,14 @@ env:
- SYMFONY_VERSION=dev-master - SYMFONY_VERSION=dev-master
before_script: before_script:
- composer require symfony/routing:${SYMFONY_VERSION} --no-update - composer require symfony/routing:${SYMFONY_VERSION} --prefer-source
- composer install --dev
script: phpunit --coverage-text script: phpunit --coverage-text
notifications: notifications:
irc: "irc.freenode.org#symfony-cmf" irc: "irc.freenode.org#symfony-cmf"
email: "symfony-cmf-devs@googlegroups.com" email: "symfony-cmf-devs@googlegroups.com"
matrix:
allow_failures:
- env: SYMFONY_VERSION=dev-master
Changelog Changelog
========= =========
1.1 1.1.0-RC1
--- ---------
* **2013-04-30**: Dropped Symfony 2.1 support and got rid of ConfigurableUrlMatcher class * **2013-07-31**: DynamicRouter now accepts an EventDispatcher to trigger a
* **2013-04-05**: [ContentAwareGenerator] Fix locale handling to always respect locale but never have unnecessary ?locale= RouteMatchEvent right before the matching starts
* **2013-07-29**: Renamed RouteAwareInterface to RouteReferrersReadInterface
for naming consistency and added RouteReferrersInterface for write access.
* **2013-07-13**: NestedMatcher now expects a FinalMatcherInterface as second
argument of the constructor
1.1.0-alpha1
------------
* **2013-04-30**: Dropped Symfony 2.1 support and got rid of
ConfigurableUrlMatcher class
* **2013-04-05**: [ContentAwareGenerator] Fix locale handling to always respect
locale but never have unnecessary ?locale=
Contributing
------------
Symfony2 CMF is an open source, community-driven project. We follow the same
guidelines as core Symfony2. If you'd like to contribute, please read the
[Contributing Code][1] part of the documentation. If you're submitting a pull
request, please follow the guidelines in the [Submitting a Patch][2] section
and use the [Pull Request Template][3].
[1]: http://symfony.com/doc/current/contributing/code/index.html
[2]: http://symfony.com/doc/current/contributing/code/patches.html#check-list
[3]: http://symfony.com/doc/current/contributing/code/patches.html#make-a-pull-request
<?php <?php
/*
* This file is part of the Symfony CMF package.
*
* (c) 2011-2013 Symfony CMF
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Cmf\Component\Routing; namespace Symfony\Cmf\Component\Routing;
use Symfony\Component\Routing\RouterInterface; use Symfony\Component\Routing\RouterInterface;
...@@ -168,6 +178,7 @@ private function doMatch($url, Request $request = null) ...@@ -168,6 +178,7 @@ private function doMatch($url, Request $request = null)
if (null === $request) { if (null === $request) {
$request = Request::create($url); $request = Request::create($url);
} }
return $router->matchRequest($request); return $router->matchRequest($request);
} }
// every router implements the match method // every router implements the match method
...@@ -217,9 +228,7 @@ public function generate($name, $parameters = array(), $absolute = false) ...@@ -217,9 +228,7 @@ public function generate($name, $parameters = array(), $absolute = false)
try { try {
return $router->generate($name, $parameters, $absolute); return $router->generate($name, $parameters, $absolute);
} catch (RouteNotFoundException $e) { } catch (RouteNotFoundException $e) {
$hint = ($router instanceof VersatileGeneratorInterface) $hint = $this->getErrorMessage($name, $router, $parameters);
? $router->getRouteDebugMessage($name, $parameters)
: "Route '$name' not found";
$debug[] = $hint; $debug[] = $hint;
if ($this->logger) { if ($this->logger) {
$this->logger->info('Router '.get_class($router)." was unable to generate route. Reason: '$hint': ".$e->getMessage()); $this->logger->info('Router '.get_class($router)." was unable to generate route. Reason: '$hint': ".$e->getMessage());
...@@ -231,12 +240,28 @@ public function generate($name, $parameters = array(), $absolute = false) ...@@ -231,12 +240,28 @@ public function generate($name, $parameters = array(), $absolute = false)
$debug = array_unique($debug); $debug = array_unique($debug);
$info = implode(', ', $debug); $info = implode(', ', $debug);
} else { } else {
$info = "No route '$name' found"; $info = $this->getErrorMessage($name);
} }
throw new RouteNotFoundException(sprintf('None of the chained routers were able to generate route: %s', $info)); throw new RouteNotFoundException(sprintf('None of the chained routers were able to generate route: %s', $info));
} }
private function getErrorMessage($name, $router = null, $parameters = null)
{
if ($router instanceof VersatileGeneratorInterface) {
$displayName = $router->getRouteDebugMessage($name, $parameters);
} elseif (is_object($name)) {
$displayName = method_exists($name, '__toString')
? (string) $name
: get_class($name)
;
} else {
$displayName = (string) $name;
}
return "Route '$displayName' not found";
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
......