diff --git a/routing/custom_route_loader.rst b/routing/custom_route_loader.rst index 5aa90a8712d..2b506aba40e 100644 --- a/routing/custom_route_loader.rst +++ b/routing/custom_route_loader.rst @@ -65,7 +65,7 @@ Symfony provides several route loaders for the most common needs: - + @@ -92,7 +92,10 @@ Symfony provides several route loaders for the most common needs: // loads routes from the PHP attributes (#[Route(...)]) // of the controllers found in the given PSR-4 namespace root - $routes->import('../src/Controller/', 'attribute@App\Controller'); + $routes->import( + ['path' => '../src/Controller/', 'namespace' => 'App\Controller'], + 'attribute', + ); // loads routes from the PHP attributes (#[Route(...)]) // of the controllers found in that directory