Skip to content

Commit 42439f2

Browse files
committed
Merge branch '5.4' into 6.4
* 5.4: update controller return value doc
2 parents b313d4c + d019fc4 commit 42439f2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

controller.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,14 @@ response types. Some of these are mentioned below. To learn more about the
683683
``Request`` and ``Response`` (and different ``Response`` classes), see the
684684
:ref:`HttpFoundation component documentation <component-http-foundation-request>`.
685685

686+
.. note::
687+
688+
Technically, a controller can return a value other than a ``Response``.
689+
However, your application is responsible for transforming that value into a
690+
``Response`` object. This is handled using :doc:`events </event_dispatcher>`
691+
(specifically the :ref:`kernel.view event <component-http-kernel-kernel-view>`),
692+
an advanced feature you'll learn about later.
693+
686694
Accessing Configuration Values
687695
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
688696

0 commit comments

Comments
 (0)