File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -46,21 +46,24 @@ Services & Configuration
4646If you want to modify service definitions of another bundle, you can use a compiler
4747pass to change the class of the service or to modify method calls. In the following
4848example, the implementing class for the ``original-service-id `` is changed to
49- ``App\YourService ``::
49+ ``App\YourService ``:
50+
51+ .. code-block :: diff
5052
5153 // src/Kernel.php
5254 namespace App;
5355
54- use App\Service\YourService;
55- use Symfony\Component\DependencyInjection\ContainerBuilder;
56+ // ...
57+ + use App\Service\YourService;
58+ + use Symfony\Component\DependencyInjection\ContainerBuilder;
5659
5760 class Kernel extends BaseKernel
5861 {
59- public function process(ContainerBuilder $container)
60- {
61- $definition = $container->findDefinition('original-service-id');
62- $definition->setClass(YourService::class);
63- }
62+ + public function process(ContainerBuilder $container)
63+ + {
64+ + $definition = $container->findDefinition('original-service-id');
65+ + $definition->setClass(YourService::class);
66+ + }
6467 }
6568
6669 For more information on compiler passes, see :doc: `/service_container/compiler_passes `.
You can’t perform that action at this time.
0 commit comments