Commit 1bf98066 authored by Crell's avatar Crell Committed by effulgentsia

Convert LegacyUrlMatcher to use RequestMatcherInterface rather than UrlMatcherInterface.

parent 41586439
......@@ -59,7 +59,7 @@ public function build(ContainerBuilder $container) {
$dispatcher = $container->get('dispatcher');
$matcher = new \Drupal\Core\LegacyUrlMatcher();
$content_negotation = new \Drupal\Core\ContentNegotiation();
$dispatcher->addSubscriber(new \Drupal\Core\EventSubscriber\RouterListener($matcher));
$dispatcher->addSubscriber(new \Symfony\Component\HttpKernel\EventListener\RouterListener($matcher));
$dispatcher->addSubscriber(new \Drupal\Core\EventSubscriber\ViewSubscriber($content_negotation));
$dispatcher->addSubscriber(new \Drupal\Core\EventSubscriber\AccessSubscriber());
$dispatcher->addSubscriber(new \Drupal\Core\EventSubscriber\MaintenanceModeSubscriber());
......
......@@ -9,13 +9,14 @@
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
use Symfony\Component\Routing\Matcher\UrlMatcherInterface;
use Symfony\Component\Routing\Matcher\RequestMatcherInterface;
use Symfony\Component\Routing\RequestContextAwareInterface;
use Symfony\Component\Routing\RequestContext;
/**
* UrlMatcher matches URL based on a set of routes.
*/
class LegacyUrlMatcher implements UrlMatcherInterface {
class LegacyUrlMatcher implements RequestMatcherInterface, RequestContextAwareInterface {
/**
* The request context for this matcher.
......@@ -98,8 +99,8 @@ public function getRequest() {
*
* @api
*/
public function match($pathinfo) {
if ($router_item = $this->matchDrupalItem($pathinfo)) {
public function matchRequest(Request $request) {
if ($router_item = $this->matchDrupalItem($request->attributes->get('system_path'))) {
$ret = $this->convertDrupalItem($router_item);
// Stash the router item in the attributes while we're transitioning.
$ret['drupal_menu_item'] = $router_item;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment