-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Description
Symfony version(s) affected
6.4.0, 6.4.1
Description
When using the HttpClientInterface
in Symfony <=6.3.8, you had a nice little „Copy as cURL” button within the Profiler's „HTTP Client” section. This button is missing since Symfony 6.4.0 and still missing in 6.4.1.
This feature has been introduced in 6.1.0: https://symfony.com/blog/new-in-symfony-6-1-profiler-improvements-part-2#copying-http-client-requests-as-curl-commands
How to reproduce
- Use the
HttpClientInterface
to make any request - Open the web profiler, go the „HTTP Client” section
- See the missing button
Possible Solution
I had a quick glimpse at the changed Twig templates and the http_client.html.twig
template still contains the necessary button: https://github.com/symfony/web-profiler-bundle/blob/14752d3fb77c3c69b6cee7c03c06e2d6494a196b/Resources/views/Collector/http_client.html.twig#L132
The curlCommand
trace is also present: https://github.com/symfony/http-client/blob/db714986d3b84330bb6196fdb201c9f79b3a8853/DataCollector/HttpClientDataCollector.php#L171
I can also confirm that I'm using a Symfony\Component\HttpClient\TraceableHttpClient
to make my HTTP requests and that the HttpClientDataCollector
's logic is being called that generates the curlCommand
information for the traces.