<?php
use Symfony\Component\HttpKernel\DataCollector\RequestDataCollector;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
$dataCollector = new RequestDataCollector();
$request = Request::createFromGlobals();
$response = new Response('output');
$response->prepare($request);
$dataCollector->collect($request, $response);
dump(
$dataCollector->getFormat(),
$dataCollector->getMethod(),
$dataCollector->getContentType(),
$dataCollector->getStatusCode()
);
^ "html"
^ "GET"
^ "text/html; charset=UTF-8"
^ 200