HTTPlug, Guzzle & API's Show Summary
Tobias, how did you get involved in Guzzle?
Michael tweeted a call for an additional maintainer.
Tobias answered the call.
Márk Sági-Kazár is also a superstar maintainer on the project.
Guzzle has released several major releases in a fairly short space of time, which has lead to some conflicts. The Guzzle community will be more careful about a version 7 release.
What does HTTPlug offer that Guzzle doesn't?
HTTPlug is an abstraction over HTTP clients and provides a consistent PSR-7 compliant wrapper over multiple HTTP clients.
It grew out of Ivory HTTP Adapter.
Using HTTPlug means your code depends on an HTTP abstraction rather than an HTTP implementation.
How do I migrate to HTTPlug?
It depends on how coupled you are to an existing implementation.
You need 3 libraries/packages to implement HTTPlug:
A HTTP message (PSR-7 implementation)
A way to create the message (message factory)
A way to send the message (HTTP client)
Users of libraries that use HTTPlug may choose their own packages/implementations or library maintainers may specify default implementations.
HTTPlug is for library authors. Application developers are consumers of HTTPlug.
Brian talks about Stormpath PHP SDK's migration to HTTPlug
Stormpath SDK was using Guzzle 3 which is now abandoned.
Lack of other dependencies/integrations allowed Stormpath to avoid upgrading.
Once they started adding more integrations, this lead to problems with conflicting version requirements.
There was some debate over whether to migrate to a newer version of Guzzle or use something else.
HTTPlug represented a more versatile solution.
Tobias and Magnus Nordlander helped them to migrate.
Stormpath provide default implementations for HTTPlug to wrap, but users may change them.
Woody, what are the reasons for thephpleague/oauth2-client sticking with Guzzle?
thephpleague/oauth2-client recently decided against migrating to HTTPlug.
Guzzle is the de-facto standard.
Guzzle 6 is PSR-7 now compliant.
With wider adoption of PSR-7, there is less need for an abstraction library like HTTPlug. PSR-7 provides that abstraction.
HTTPlug can add complexity for your users if you force them to pick their own implementations.
Is this a transient problem, is there a long-term need for an abstraction like HTTPlug?
Building HTTPlug was something that could be done quickly. PSRs move slowly.
There are several upcoming PSR standards (PSR-15, PSR-17) which should help to resolve these issues.
In principle, these upcoming PSRs should solve problems, but during the transitional phase of libraries adopting these standards, we may still need adapters.