8000 Merge branch '4.4' into 5.1 · symfony/symfony-docs@4513d74 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4513d74

Browse files
committed
Merge branch '4.4' into 5.1
* 4.4: Multiple PHP class per file not allowed
2 parents 3759fd0 + 064c106 commit 4513d74

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)
0