A plugin that is using a Guzzle request is now throwing an exception that the class cannot be found.

I'm running Craft CMS 2.6.3000. Where is Guzzle being pulled from? I can see it within craft/app/vendor/guzzle and also within plugins/oauth/vendor but for some reason this plugin cannot cannot use this class anymore.

It is being referenced as $client = new \GuzzleHttp\Client();

Why can't the class be used?


Just a quick guess, but here is what I have on a project I am working on.

$client = new \Guzzle\Http\Client();
$request = $client->get($url);


$client = new \GuzzleHttp\Client();


$client = new \Guzzle\Http\Client();

I have \Http\Client - maybe you are just missing the slash?

  • What's weird though is its been working like this for a while. Maybe a plugin update has caused this, I'm not sure. – James White Dec 13 '17 at 18:29
  • I get Call to undefined method Guzzle\Http\Client::request() when using that version for $client. – James White Dec 13 '17 at 18:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.