I am using Xdebug to debug code with guzzle curl calls.
In any other code, Xdebug works fine.
But whenever there are client calls with Guzzle, All I get is a timeout.
I am using:
richarvey/nginx-php-fpm:latest (nginx+php fpm)here is the code snippet, where it freezes:
public function fetch(): string
{
$content = '';
$completePath = self::FETCH_PATH . $this->id;
$request = $this->httClient->get($completePath);
if ($request->getStatusCode() == 200) {
$content = $request->getBody()->getContents();
}
return $content;
}
I had the same problem. I believe that the problem occured when two different php process tried to open a Xdebug connection at the same time with the same IDE KEY. (like when you run a test with php cli and the test does a request to your apache/nginx/php-fpm). I assigned a different Xdebug IDE key for cli and fpm and it worked for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With