@@ -43,28 +43,12 @@ before the bundle one).
4343Services & Configuration
4444------------------------
4545
46- If you want to modify service definitions of another bundle, you can use a compiler
47- pass to change the class of the service or to modify method calls. In the following
48- example, the implementing class for the ``original-service-id `` is changed to
49- ``Acme\DemoBundle\YourService ``::
50-
51- // src/Acme/DemoBundle/DependencyInjection/Compiler/OverrideServiceCompilerPass.php
52- namespace Acme\DemoBundle\DependencyInjection\Compiler;
53-
54- use Acme\DemoBundle\YourService;
55- use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
56- use Symfony\Component\DependencyInjection\ContainerBuilder;
57-
58- class OverrideServiceCompilerPass implements CompilerPassInterface
59- {
60- public function process(ContainerBuilder $container)
61- {
62- $definition = $container->getDefinition('original-service-id');
63- $definition->setClass(YourService::class);
64- }
65- }
66-
67- For more information on compiler passes, see :doc: `/service_container/compiler_passes `.
46+ If you want to modify the services created by a bundle, you can use
47+ :doc: `service decoration </service_container/service_decoration >`.
48+
49+ If you want to do more advanced manipulations, like removing services created by
50+ other bundles, you must work with :doc: `service definitions </service_container/definitions >`
51+ inside a :doc: `compiler pass </service_container/compiler_passes >`.
6852
6953Entities & Entity Mapping
7054-------------------------
0 commit comments