Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[HttpClient] Fix handling thrown \Exception in \Generator in MockResponse#44438
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
[HttpClient] Fix handling thrown \Exception in \Generator in MockResponse#44438
Uh oh!
There was an error while loading.Please reload this page.
Conversation
fancyweb commentedDec 3, 2021
| Q | A |
|---|---|
| Branch? | 4.4 |
| Bug fix? | yes |
| New feature? | no |
| Deprecations? | no |
| Tickets | - |
| License | MIT |
| Doc PR | - |
810e8a6 to6ba7548Comparefancyweb commentedDec 3, 2021
Failure is related, I need to investigate. |
fancyweb commentedDec 3, 2021
@nicolas-grekas The failure is related to the PHP version. It seems that the destructor of |
3beaf09 tof2867f4Comparef2867f4 toc71265bCompare| $responses[] =newMockResponse($body, ['response_headers' =>$headers]); | ||
| $responses[] =newMockResponse($body, ['response_headers' =>$headers]); | ||
| $responses[] =newMockResponse((function () {thrownew \Exception('Fake connection timeout');yield''; })(), ['response_headers' =>$headers]); | ||
| $responses[] =newMockResponse((function () {yield''; })(), ['response_headers' =>$headers]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
We don't need to throw for the test to be effective. Yielding after throwing "breaks" PHP 7.2.
nicolas-grekas commentedDec 11, 2021
Thank you@fancyweb. |