src/Kernel/HttpKernel.php
public function run(Request $request): Response
    {
        // Resolve the route
        $route = $this->resolveRoute($request);

        // Merge the path-based parameters into the request attributes
        $request->attributes->add($route->getPathParams($request->getPathInfo()));

        // Dispatch the request
        return $this->dispatch($request, $route);
    }
public function run(Request $request): Response
    {
        // Resolve the route
        $route = $this->resolveRoute($request);

        // Merge the path-based parameters into the request attributes
        $request->attributes->add($route->getPathParams($request->getPathInfo()));

        // Dispatch the request
        return $this->dispatch($request, $route);
    }
Kernel invoker

@param Request $request
@return Response