Closed
Description
Symfony version(s) affected
5.4.20
Description
With symfony/http-client 5.4.20 HTTP requests no longer appear in the HTTP Client tab of the Symfony profiler.
How to reproduce
Create a controller with an action with an HttpClientInterface parameter.
In the action code, make a call to a valid URL with the client:
<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Mailer\MailerInterface;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Contracts\HttpClient\HttpClientInterface;
class TestController extends AbstractController
{
/**
* @Route("/test")
*/
public function test(HttpClientInterface $httpClient): Response
{
$httpClient->request('GET','http://google.com');
return $this->render('index.html.twig');
}
}
With the project in dev mode with debug activated, call the route and go to the profiler:
- With symfony/http-client 5.4.19 an entry is added to the HTTP Client tab of the profiler
- With symfony/http-client 5.4.20 the HTTP Client tab of the profiler is empty
Possible Solution
No response
Additional Context
No response