helpscout / helpscout-api-php

PHP Wrapper for the Help Scout API
MIT License
98 stars 62 forks source link

Add support for Guzzle 7 #253

Closed dmlogic closed 3 years ago

dmlogic commented 3 years ago

This PR adjusts expectations of Guzzle exception types to enable use of either v6 or v7.

It was necessary to do this to allow this API to be imported into a Laravel v8 project as that framework now requires Guzzle v7. I doubt I will be the last person to encounter that problem.

I did not examine your exception handling logic exhaustively, but I believe adjusting RestClientBuilder::getRetryDecider to accept a base GuzzleException does not cause any change in behaviour.

All tests are passing locally with Guzzle6 and Guzzle7.

I hope you will give this PR some consideration and please let me know if you need anything else.

dmlogic commented 3 years ago

Thanks!