private function finishRequest(Request $request, int $type)
    {
        $this->dispatcher->dispatch(new FinishRequestEvent($this, $request, $type), KernelEvents::FINISH_REQUEST);
        $this->requestStack->pop();
    }
private function finishRequest(Request $request, int $type)
    {
        $this->dispatcher->dispatch(new FinishRequestEvent($this, $request, $type), KernelEvents::FINISH_REQUEST);
        $this->requestStack->pop();
    }
private function finishRequest ( Request $ request , int $ type ) { $ this -> dispatcher -> dispatch ( new FinishRequestEvent ( $ this , $ request , $ type ) , KernelEvents :: FINISH_REQUEST ) ; $ this -> requestStack -> pop ( ) ; }
Publishes the finish request event, then pop the request from the stack.

Note that the order of the operations is important here, otherwise
operations such as {@link RequestStack::getParentRequest()} can lead to
weird results.
Publishes the finish request event then pop the request from the stack .