File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -447,7 +447,7 @@ and provides methods for getting and setting response headers. The header names
447447normalized. As a result, the name ``Content-Type `` is equivalent to
448448the name ``content-type `` or ``content_type ``.
449449
450- In Symfony, a controller usually returns a ``Response `` object::
450+ In Symfony, a controller is required to return a ``Response `` object::
451451
452452 use Symfony\Component\HttpFoundation\Response;
453453
@@ -465,11 +465,11 @@ response types. Some of these are mentioned below. To learn more about the
465465
466466.. note ::
467467
468- When a controller returns a non-`` Response `` object, a ``kernel.view ``
469- listener is expected to transform it into a `` Response `` object;
470- otherwise an exception is thrown.
471-
472- See :ref: ` kernel.view event < component-http-kernel-kernel-view >` for details on the `` kernel.view `` event .
468+ Technically, a controller can return a value other than a ``Response ``.
469+ However, your application is responsible for transforming that value into a
470+ `` Response `` object. This is handled using :doc: ` events < /event_dispatcher >`
471+ (specifically the :ref: ` kernel.view event < component-http-kernel-kernel-view >`),
472+ an advanced feature you'll learn about later .
473473
474474Accessing Configuration Values
475475~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can’t perform that action at this time.
0 commit comments