Skip to content

Commit 35e6605

Browse files
committed
Merge branch '5.1' into 5.x
* 5.1: Multiple PHP class per file not allowed
2 parents 5ddd135 + 4513d74 commit 35e6605

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

routing.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ the ``list()`` method of the ``BlogController`` class.
7676
example, URLs like ``/blog?foo=bar`` and ``/blog?foo=bar&bar=foo`` will
7777
also match the ``blog_list`` route.
7878

79+
.. caution::
80+
81+
If you define multiple PHP classes in the same file, Symfony only loads the
82+
routes of the first class, ignoring all the other routes.
83+
7984
The route name (``blog_list``) is not important for now, but it will be
8085
essential later when :ref:`generating URLs <routing-generating-urls>`. You only
8186
have to keep in mind that each route name must be unique in the application.

0 commit comments

Comments
 (0)