Skip to content

[HttpClient] Add JsonMockResponse #18247

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

Conversation

alamirault
Copy link
Contributor

Fix #18230

@carsonbot carsonbot added this to the 6.3 milestone Apr 23, 2023
@alamirault alamirault force-pushed the feature/18230-add-json-mock-response branch from f469877 to 01e1d4a Compare April 23, 2023 09:21
http_client.rst Outdated
@@ -2032,6 +2032,19 @@ Then configure Symfony to use your callback:
;
};

You can also use :class:`Symfony\\Component\\HttpClient\\Response\\JsonMockResponse` which automatically encode
Copy link
Contributor

Choose a reason for hiding this comment

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

We should explain before and after, like:

"To return json, you would normally do ......", CODE-EXAMPLE, "you can use the following way instead...." CODE-EXAMPLE with JsonMockResponse

WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I push new version with your suggestion !

But I'm not sure about php code style, What is the rule ? Does pipeline check this ?

@OskarStark
Copy link
Contributor

Thanks Antoine.

@OskarStark OskarStark force-pushed the feature/18230-add-json-mock-response branch from cea8d14 to b68944c Compare April 27, 2023 06:18
@OskarStark OskarStark merged commit 697ddf3 into symfony:6.3 Apr 27, 2023
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.

4 participants