diff --git a/core/lib/Drupal/Core/Routing/AccessAwareRouter.php b/core/lib/Drupal/Core/Routing/AccessAwareRouter.php index 76a9477..5c3d931 100644 --- a/core/lib/Drupal/Core/Routing/AccessAwareRouter.php +++ b/core/lib/Drupal/Core/Routing/AccessAwareRouter.php @@ -7,7 +7,6 @@ use Drupal\Core\Session\AccountInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; -use Symfony\Component\Routing\Generator\Dumper\GeneratorDumperInterface; use Symfony\Component\Routing\Matcher\RequestMatcherInterface; use Symfony\Component\Routing\RequestContext as SymfonyRequestContext; use Symfony\Component\Routing\RequestContextAwareInterface; diff --git a/core/lib/Drupal/Core/Routing/Router.php b/core/lib/Drupal/Core/Routing/Router.php index 58f6fb3..f1e280b 100644 --- a/core/lib/Drupal/Core/Routing/Router.php +++ b/core/lib/Drupal/Core/Routing/Router.php @@ -10,7 +10,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Exception\MethodNotAllowedException; use Symfony\Component\Routing\Exception\ResourceNotFoundException; -use Symfony\Component\Routing\Generator\UrlGeneratorInterface; +use Symfony\Component\Routing\Generator\UrlGeneratorInterface as BaseUrlGeneratorInterface; use Symfony\Component\Routing\Matcher\RequestMatcherInterface; use Symfony\Component\Routing\RouteCollection; use Symfony\Component\Routing\RouterInterface; @@ -23,20 +23,22 @@ * * It consists of several steps, of which each are explained in more details * below: - * 1. Get a collection of routes which potentially match the current request: - * This is done by the route provider, see ::getInitialRouteCollection(). - * 2. Filter the collection down further more. For example this filters out - * routes applying to other formats: See ::applyRouteFilters() - * 3. Find the best matching route out of the remaining ones, by applying a - * regex: See ::matchCollection(). - * 4. Enhance the list of route attributes, for example loading entity objects - * See ::applyRouteEnhancers(). + * 1. Get a collection of routes which potentially match the current request. + * This is done by the route provider. See ::getInitialRouteCollection(). + * 2. Filter the collection down further more. For example this filters out + * routes applying to other formats: See ::applyRouteFilters() + * 3. Find the best matching route out of the remaining ones, by applying a + * regex. See ::matchCollection(). + * 4. Enhance the list of route attributes, for example loading entity objects. + * See ::applyRouteEnhancers(). * * This implementation uses ideas of the following routers: + * - \Symfony\Cmf\Component\Routing\DynamicRouter + * - \Drupal\Core\Routing\UrlMatcher + * - \Symfony\Cmf\Component\Routing\NestedMatcher\NestedMatcher * * @see \Symfony\Cmf\Component\Routing\DynamicRouter * @see \Drupal\Core\Routing\UrlMatcher - * @see \Symfony\Cmf\Component\Routing\NestedMatcher\NestedMatcher */ class Router extends UrlMatcher implements RequestMatcherInterface, RouterInterface { @@ -92,7 +94,7 @@ class Router extends UrlMatcher implements RequestMatcherInterface, RouterInterf * @param \Symfony\Component\Routing\Generator\UrlGeneratorInterface $url_generator * The URL generator. */ - public function __construct(BaseRouteProviderInterface $route_provider, CurrentPathStack $current_path, UrlGeneratorInterface $url_generator) { + public function __construct(BaseRouteProviderInterface $route_provider, CurrentPathStack $current_path, BaseUrlGeneratorInterface $url_generator) { parent::__construct($current_path); $this->routeProvider = $route_provider; $this->urlGenerator = $url_generator; @@ -170,7 +172,7 @@ protected function getInitialRouteCollection(Request $request) { } /** - * Apply the route enhancers to the defaults, according to priorities + * Apply the route enhancers to the defaults, according to priorities. * * @param array $defaults * The defaults coming from the final matched route.