Skip to content

[Profiler][HttpClient] „Copy as cURL” button missing in Symfony 6.4.0 — 6.4.1 #52920

@keichinger

Description

@keichinger

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.

Additional Context

Working in Symfony 6.3 (all dependencies at their latest ~6.3 version)

CleanShot 2023-12-06 at 21 54 10@2x

Missing in Symfony 6.4.0 / 6.4.1

CleanShot 2023-12-06 at 21 55 11@2x

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy