diff --git a/components/http_foundation/introduction.rst b/components/http_foundation/introduction.rst index ad051871445..01fc84aae53 100644 --- a/components/http_foundation/introduction.rst +++ b/components/http_foundation/introduction.rst @@ -431,7 +431,7 @@ class, which can make this even easier:: use Symfony\Component\HttpFoundation\JsonResponse; $response = new JsonResponse(); - $response->setContent(array( + $response->setData(array( 'data' => 123 ));