Skip to content

[HttpClient] fix chaining promises returned by HttplugClient #37927

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
Aug 26, 2020
Merged

[HttpClient] fix chaining promises returned by HttplugClient #37927

merged 1 commit into from
Aug 26, 2020

Conversation

CthulhuDen
Copy link
Contributor

Q A
Branch? 5.1
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #37925
License MIT

Guzzle runtime does not play too well with foreign promises, which can be fixed by wrapping them with promise_for.
Added failing test case from #37925 and suggested fix.
Should not break BC because then callback results get resolved before being passed to next then callback or returned from wait.

@nicolas-grekas nicolas-grekas changed the title Fix 37925 [HttpClient] fix chaining promises returned by HttplugClient Aug 26, 2020
@nicolas-grekas nicolas-grekas added this to the 5.1 milestone Aug 26, 2020
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

(I just did some minor tweaks)

@fabpot
Copy link
Member

fabpot commented Aug 26, 2020

Thank you @CthulhuDen.

@fabpot fabpot merged commit fc3095f into symfony:5.1 Aug 26, 2020
@CthulhuDen CthulhuDen deleted the fix-37925 branch August 26, 2020 15:20
@fabpot fabpot mentioned this pull request Aug 31, 2020
nicolas-grekas added a commit that referenced this pull request Jan 13, 2022
…\promise_for (plozmun)

This PR was merged into the 5.3 branch.

Discussion
----------

[HttpClient] Remove deprecated usage of GuzzleHttp\Promise\promise_for

| Q             | A
| ------------- | ---
| Branch?       | 5.3,
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Similar to #44890 but this function was introduced in 5.1 #37927

Commits
-------

3d2ed70 [HttpClient] Remove deprecated usage of GuzzleHttp\Promise\promise_for
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.

[HttpClient] Httplug adapter bug with async requests
4 participants