8p / EightPointsGuzzleBundle

⛽️ Integrates Guzzle 6.x, a PHP HTTP Client, into Symfony
MIT License
440 stars 71 forks source link

Query strings cause serialising issues #7

Closed andywooyay closed 9 years ago

andywooyay commented 9 years ago

If I run:

$response = $client->get('hello');

Everything works correctly, but if I add a query string:

$response = $client->get('hello?a=1');
// or
$response = $client->get('hello', ['query' => ['a' => '1']]);

Everything works correctly but the Symfony profiler chokes and throws:

Exception in DataCollector.php line 35: Serialization of 'Closure' is not allowed.

I'm having comment out $this->addLogs($messages); in \EightPoints\Bundle\GuzzleBundle\DataCollector\HttpDataCollector to avoid this.

florianpreusner commented 9 years ago

Which version have you used? I'm not able to reproduce by running dev-master...

andywooyay commented 9 years ago

I used composer require, so ~2.1 with Symfony 2.6.6.

florianpreusner commented 9 years ago

I have created a new symfony project with guzzle bundle version 2.1.0. I'm getting different issues. Using dev-master seems to work without any problems. I will create a new version this weekend.

ip512 commented 9 years ago

I have the same kind of issue on all forms when a file is uploaded, even if I don't use Guzzle. I commented $this->addRequest($request, $response); in the Datacollector to avoid the issue

florianpreusner commented 9 years ago

Changed the behavior for collecting debug information. It would be great if you can test again using dev-master. If everything is fine I will create a new tag/version. Thanks.

ip512 commented 9 years ago

It seems to works fine with dev-master, thank you for the fix

florianpreusner commented 9 years ago

Released 2.1.1. Thanks for your contribution and testing!