Undefined Method on GuzzleHttp\Client When Using v5.3
adamjreed opened this issue · 2 comments
Hi guys,
We're using the Optimizely PHP SDK at Patientco and it looks like we ran into an issue the other day.
Some quick background:
We've been running the Optimizely SDK for a few months now with no problems. This afternoon we rolled out another PHP package via Composer that required Guzzle 5.3 and we started noticing some PHP Fatal Errors coming from the Optimizely package. It looks like the versioning in your composer.json allow it to use either Guzzle 5.3 or 6.2, but the SDK isn't actually compatible with 5.3 because it calls a function on the \GuzzleHttp\Client class that only exists in 6.2.
The error:
PHP message: PHP Fatal error: Call to undefined method GuzzleHttp\Client::request() in [application path]/vendor/optimizely/optimizely-sdk/src/Optimizely/Event/Dispatcher/DefaultEventDispatcher.php on line 53
We're going to try to roll the other package up to 6.2 as a workaround in the meantime, but if you could take a look that would be great. For reference, we are currently on Guzzle v5.3.1 and Optimizely v1.3.0. Thanks!
Thanks for logging the issue @adamjreed ... we will look into this.
Seems obsolete. Going to close out for now.