From d9b4121f53e7f6572476de2e6cd1c8c032b28482 Mon Sep 17 00:00:00 2001 From: fancyweb Date: Sun, 7 Apr 2019 10:34:53 +0200 Subject: [PATCH] [Routing] Invokable route loader services --- routing/custom_route_loader.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/routing/custom_route_loader.rst b/routing/custom_route_loader.rst index b99c6292d24..70126b473ac 100644 --- a/routing/custom_route_loader.rst +++ b/routing/custom_route_loader.rst @@ -133,6 +133,15 @@ extend or implement any special class, but the called method must return a cached by the framework. So whenever your service should load new routes, don't forget to clear the cache. +.. tip:: + + If your service is invokable, you don't need to precise the method to use. + +.. versionadded:: 4.3 + + The support of the ``__invoke()`` method to create invokable route loader + services was introduced in Symfony 4.3. + Creating a custom Loader ------------------------