Description
Symfony version(s) affected
7.3-BETA2
Description
I cannot see any notes in the ChangeLog about this update to add a disabled
constructor argument and an additional check before profiling the HttpClient
https://github.com/symfony/http-client/blob/7.3/TraceableHttpClient.php#L27-L43
In my tests, this is preventing some http client calls to a cache server endpoint from being collected, resulting in a false-negative test result stating my application has not done the HTTP request to clear a resource from a cache.
Additionally I cannot see docs just yet on manually disabling or enabling the profiler.
During the test, when $this->disabled?->__invoke()
is called, invoking ProfilerStateChecker
, $this->container->get('profiler')
is not retrievable from the container yet. $this->container->get('profiler')?->isEnabled()
returns null
as a result.
I've traced that the _construct
is not being called on the Profiler
until after the Http requests have been made now. Has a priority changed, or something new required in Behat tests for this?
How to reproduce
I'm sorry this is not a minimal reproduction, but sometimes having this brought up will quickly get a eurika moment from the core devs. But the tests are failing on the next
version testing in my bundle here:
https://github.com/components-web-app/api-components-bundle/
Possible Solution
No response
Additional Context
No response