diff --git a/routing.rst b/routing.rst index 117fd75bded..bd256fca9b5 100644 --- a/routing.rst +++ b/routing.rst @@ -46,6 +46,10 @@ following configuration file: This configuration tells Symfony to look for routes defined as annotations in any PHP class stored in the ``src/Controller/`` directory. +.. caution:: + + If you define multiple PHP class per file, only the first declared class can be loaded, try to define one PHP class per file instead, visit `PSR-4 `_ for more details. + Suppose you want to define a route for the ``/blog`` URL in your application. To do so, create a :doc:`controller class ` like the following::