By dawehner on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.0.x
Introduced in version:
8.0.0-beta12
Issue links:
Description:
Route providers used to be only responsible to provide a list of possible routes for an incoming request.
With that change its also responsible for doing inbound path processing, so for example applying the path aliases.
A potential implementation looks like the following:
$path = trim($request->getPathInfo(), '/');
$path = $this->pathProcessor->processInbound($path, $request);
$this->currentPath->setPath('/' . $path, $request);
// Incoming path processors may also set query parameters.
$query_parameters = $request->query->all();
$routes = $this->getRoutesByPath('/' . rtrim($path, '/'));
Path processing
Path processing now is executed right before routing, so in case you need to access the current path using the path.current
you need to come after KernelEvents::REQUEST with priority 32.
Impacts:
Module developers