Skip to content

[HttpClient] add HttplugClient for compat with libs that need httplug v1 or v2 #31976

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 11, 2019

Conversation

nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented Jun 10, 2019

Q A
Branch? 4.4
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR symfony/symfony-docs#11820

Many libs still depend on httplug:
https://packagist.org/packages/php-http/client-implementation/dependents

Until they're all updated to PSR-18 or SFContracts, this PR provides an adapter for injecting a Symfony HttpClient into httplug-compatible classes, v1 or v2.

Copy link
Member

@Nyholm Nyholm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@nicolas-grekas nicolas-grekas force-pushed the hc-plug branch 4 times, most recently from 31dd764 to f223518 Compare June 10, 2019 17:06
@nicolas-grekas
Copy link
Member Author

Rebased on top of #31980, waiting for it to be merged before this one.

@nicolas-grekas nicolas-grekas force-pushed the hc-plug branch 2 times, most recently from bbe103b to 27b138c Compare June 11, 2019 11:14
@nicolas-grekas
Copy link
Member Author

(rebased)

@nicolas-grekas nicolas-grekas merged commit 28674b1 into symfony:4.4 Jun 11, 2019
nicolas-grekas added a commit that referenced this pull request Jun 11, 2019
…at need httplug v1 or v2 (nicolas-grekas)

This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] add HttplugClient for compat with libs that need httplug v1 or v2

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Many libs still depend on httplug:
https://packagist.org/packages/php-http/client-implementation/dependents

Until they're all updated to PSR-18 or SFContracts, this PR provides an adapter for injecting a Symfony HttpClient into httplug-compatible classes, v1 or v2.

Commits
-------

28674b1 [HttpClient] add HttplugClient for compat with libs that need httplug v1 or v2
@nicolas-grekas nicolas-grekas deleted the hc-plug branch June 11, 2019 15:50
@nicolas-grekas
Copy link
Member Author

I used this PR to merge itself, worked like a charm :)

@nicolas-grekas nicolas-grekas restored the hc-plug branch June 12, 2019 16:37
@nicolas-grekas nicolas-grekas deleted the hc-plug branch June 12, 2019 16:37
@teohhanhui
Copy link
Contributor

Is there a reason why it doesn't implement the HttpAsyncClient interface? Or is that just missed out?

@nicolas-grekas
Copy link
Member Author

No specific reasons, PR welcome as usual.

@nicolas-grekas nicolas-grekas modified the milestones: next, 4.4 Oct 27, 2019
This was referenced Nov 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants