Symfony RequestDataCollector for collecting request and response data

Code
<?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()
);
Result
^ "html"

^ "GET"

^ "text/html; charset=UTF-8"

^ 200
Used Versions
PHP 8.0, Laminas MVC 3.2, Symfony 5.2, Laravel 8.28, PHPUnit 9.5, Doctrine ORM 2.8