php-http / httplug

HTTPlug, the HTTP client abstraction for PHP
http://httplug.io
MIT License
2.56k stars 37 forks source link

Update minimum PHP version to ^7.0 and modify Http\Client\Exception to extend \Throwable #144

Closed ramsey closed 5 years ago

ramsey commented 5 years ago
Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Related tickets fixes #142
License MIT

What's in this PR?

Updates Http\Client\Exception to extend from \Throwable. Also updates the library to support only PHP version 7.0.0 and greater, to allow use of the \Throwable interface, introduced in PHP 7.

Why?

Static analysis tools are complaining when creating HTTP clients that implement Http\Client\HttpClient

Example Usage

n/a

Checklist

Will update the CHANGELOG if this approach is acceptable to the maintainers.

To Do

n/a

sagikazarmark commented 5 years ago

I believe this should happen as part of the PSR-18 upgrade, until then I see no point in this change.

/cc @Nyholm

Nyholm commented 5 years ago

Yeah, check out the 2.x branch. I think we should merge that one to master now.

Nyholm commented 5 years ago

This is fixed in master. Thank you for this PR.