Skip to content

Commit c99cce5

Browse files
author
Grayson Koonce
committed
adding compile call to overriding parent services section
1 parent 41376f7 commit c99cce5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

components/dependency_injection/parentservices.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ to the ``NewsletterManager`` class, the config would look like this:
367367
.. code-block:: php
368368
369369
use Symfony\Component\DependencyInjection\Definition;
370+
use Symfony\Component\DependencyInjection\DefinitionDecorator;
370371
use Symfony\Component\DependencyInjection\Reference;
371372
372373
// ...
@@ -399,6 +400,8 @@ to the ``NewsletterManager`` class, the config would look like this:
399400
'%greeting_card_manager.class%'
400401
);
401402
403+
$container->compile();
404+
402405
The ``GreetingCardManager`` will receive the same dependencies as before,
403406
but the ``NewsletterManager`` will be passed the ``my_alternative_mailer``
404407
instead of the ``my_mailer`` service.

0 commit comments

Comments
 (0)