From dabf122e4dabc14b7b417d54685a270979db494e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michae=CC=88l=20Perrin?= Date: Tue, 16 May 2017 17:21:08 +0200 Subject: [PATCH] Fix decorating service definition --- service_container/service_decoration.rst | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/service_container/service_decoration.rst b/service_container/service_decoration.rst index 530a2596029..a04ce9a7a83 100644 --- a/service_container/service_decoration.rst +++ b/service_container/service_decoration.rst @@ -63,10 +63,10 @@ a reference of the old one as ``app.decorating_mailer.inner``: # ... app.decorating_mailer: - class: AppBundle\DecoratingMailer - decorates: app.mailer - arguments: ['@app.decorating_mailer.inner'] - public: false + class: AppBundle\DecoratingMailer + decorates: app.mailer + arguments: ['@app.decorating_mailer.inner'] + public: false .. code-block:: xml @@ -130,7 +130,7 @@ convention, the old ``app.mailer`` service is renamed to .. code-block:: yaml services: - app.mailer: + app.decorating_mailer: # ... decoration_inner_name: app.decorating_mailer.wooz arguments: ['@app.decorating_mailer.wooz'] @@ -146,7 +146,11 @@ convention, the old ``app.mailer`` service is renamed to @@ -160,7 +164,7 @@ convention, the old ``app.mailer`` service is renamed to use Symfony\Component\DependencyInjection\Reference; $container->register('app.decorating_mailer', DecoratingMailer::class) - ->setDecoratedService('foo', 'app.decorating_mailer.wooz') + ->setDecoratedService('app.mailer', 'app.decorating_mailer.wooz') ->addArgument(new Reference('app.decorating_mailer.wooz')) // ... ;