diff --git a/controller/service.rst b/controller/service.rst index 386e3477265..05471e9347b 100644 --- a/controller/service.rst +++ b/controller/service.rst @@ -26,7 +26,6 @@ a service like: ``App\Controller\HelloController::index``: .. code-block:: php-annotations // src/Controller/HelloController.php - use Symfony\Component\Routing\Annotation\Route; class HelloController diff --git a/doctrine.rst b/doctrine.rst index 2cb1b61729d..09c2fb55d34 100644 --- a/doctrine.rst +++ b/doctrine.rst @@ -505,9 +505,7 @@ for you automatically! First, install the bundle in case you don't have it: Now, simplify your controller:: // src/Controller/ProductController.php - use App\Entity\Product; - // ... /** * @Route("/product/{id}", name="product_show") diff --git a/messenger/multiple_buses.rst b/messenger/multiple_buses.rst index bf895efe21d..c81768185f4 100644 --- a/messenger/multiple_buses.rst +++ b/messenger/multiple_buses.rst @@ -145,7 +145,6 @@ binding capabilities to clarify which bus will be injected based on the argument .. code-block:: php // config/services.php - $container->bind('$commandBus', 'messenger.bus.commands'); $container->bind('$queryBus', 'messenger.bus.queries'); $container->bind('$eventBus', 'messenger.bus.events'); @@ -185,7 +184,6 @@ you can restrict each handler to a specific bus using the ``messenger.message_ha .. code-block:: php // config/services.php - $container->services() ->set(App\MessageHandler\SomeCommandHandler::class) ->tag('messenger.message_handler', ['bus' => 'messenger.bus.commands']); diff --git a/routing.rst b/routing.rst index ac386699e56..32bba117dc5 100644 --- a/routing.rst +++ b/routing.rst @@ -821,7 +821,6 @@ If you need to generate a URL from a service, type-hint the :class:`Symfony\\Com service:: // src/Service/SomeService.php - use Symfony\Component\Routing\Generator\UrlGeneratorInterface; class SomeService