misd-service-development/guzzle-bundle — pull request #30 by pschultz (2013-07-21 12:49:21+00:00)
Title: Fix duplicated logs when exceptions are thrown

When there are uncaught exceptions during a request Symfony might emits the `kernel.response` event twice, which in turn calls `GuzzleDataCollector::collect` twice. Because the collector uses a numerically indexed array for its data and appends the Guzzle logs each time collect is called this results in duplicated requests on the profiler page.

This PR makes the data array string indexed. The object hash of each Guzzle\Http\Request is used for the keys, so we can never store the same request twice.