Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[HttpClient][MockHttpClient][DX] Throw when the response factory callable does not return a valid response#37966

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

Conversation

@fancyweb
Copy link
Contributor

QA
Branch?4.4
Bug fix?no
New feature?no
Deprecations?no
Tickets-
LicenseMIT
Doc PR-

The current message isTypeError: Argument 4 passed to Symfony\Component\HttpClient\Response\MockResponse::fromRequest() must implement interface Symfony\Contracts\HttpClient\ResponseInterface, instance of Generator given.

I lost some time with this because I was passing a callable that returns a \Generator instead of passing the resulting \Generator directly. We could support that case but I guess with the added exception message, it is clear we don't support it at all.

@carsonbotcarsonbot added Status: Needs Review HttpClient DXDX = Developer eXperience (anything that improves the experience of using Symfony) labelsAug 27, 2020
@nicolas-grekasnicolas-grekas added this to the4.4 milestoneAug 27, 2020
@fancywebfancywebforce-pushed thehttp-client-mock-client-response-factory-throw branch fromfef0c62 toc11482fCompareAugust 28, 2020 08:03
@fancywebfancywebforce-pushed thehttp-client-mock-client-response-factory-throw branch fromc11482f to564dce3CompareAugust 28, 2020 12:31
@fabpot
Copy link
Member

Thank you@fancyweb.

@fabpotfabpot merged commit4d6ea77 intosymfony:4.4Aug 30, 2020
This was referencedAug 31, 2020
@fancywebfancyweb deleted the http-client-mock-client-response-factory-throw branchAugust 31, 2020 07:17
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas left review comments

@fabpotfabpotfabpot approved these changes

Assignees

No one assigned

Labels

DXDX = Developer eXperience (anything that improves the experience of using Symfony)HttpClientStatus: Reviewed

Projects

None yet

Milestone

4.4

Development

Successfully merging this pull request may close these issues.

4 participants

@fancyweb@fabpot@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp