The popular Guzzle HTTP client reached version 7 last week, with the exciting news that most users (the changelog says 95% of users) will be able to upgrade without modification. This release focused on increasing the minimum supported PHP version and introducing new language features found in PHP 7.
The main features of the 7.0 release include:
- Implement PSR-18
- Dropped PHP 5 support—the minimum PHP version is now
- Type hints and return types for functions and methods have been added whenever possible
- IDN support for redirects (see #2424 for details)
Be sure to check out the 6.0 to 7.0 upgrade guide for a list of known backward compatibility breaking changes with 6.x.
One update I found of note was client HTTP methods (i.e., get, post, etc.) with strong typing:
deleteAsyncmethods are now implemented as genuine methods on
GuzzleHttp\Client, with strong typing. The original
__callimplementation remains unchanged for now, for maximum backward compatibility, but won’t be invoked under normal operation.
If you still need to access the v6 documentation and otherwise may need to use both Guzzle 6 and 7, check out the version guidance table in the project’s readme. At the time of writing, the latest docs have “Guzzle 6” in the heading, but docs.guzzlephp.org/en/latest/ are the Latest Guzzle 7 docs.
7.0.1 – 2020-06-27
- Fix multiply defined functions fatal error #2699
7.0.0 – 2020-06-27
No changes since 7.0.0-rc1.
7.0.0-rc1 – 2020-06-15
- Use error level for logging errors in Middleware #2629
- Disabled IDN support by default and require ext-intl to use it #2675
7.0.0-beta2 – 2020-05-25
Utilsclass instead of functions in the
- Avoid the
getenvfunction when unsafe #2531
- Added real client methods #2529
- Avoid functions due to global install conflicts #2546
- Use Symfony intl-idn polyfill #2550
- Adding methods for HTTP verbs like
- Updated the default User Agent to “GuzzleHttp/7” #2654
- Various intl icu issues #2626
- Pool option
7.0.0-beta1 – 2019-12-30
- Implement PSR-18 and dropped PHP 5 support #2421 #2474
- PHP 7 types #2442 #2449 #2466 #2497 #2499
- IDN support for redirects 2424
- Dont allow passing null as third argument to
- Use SAPI constant instead of method call #2450
- Use native function invocation #2444
- Better defaults for PHP installations with old ICU lib 2454
- Added visibility to all constants #2462
- Dont allow passing
nullas URI to
- Widen the exception argument to throwable #2495
- Logging when Promise rejected with a string #2311
- Request options
Join 31,000+ others and never miss out on new tips, tutorials, and more.
- 👉 Looking for Senior Back-End Laravel API Developer - Immediate (Full-time Contractor) 🎉
ApproveMe.com // The Document Signing Experience™
- Senior Laravel Developer
- Senior Full-Stack Developer
Remote, USA Only
- Sr. Software Engineer
- Full Stack Web Developer
Greenville, TX (or Remote, US)
Innovation First International, Inc.