wiki/content/20201116133423-simpler_service_decoration.md

370 B

id title
e1692cfa-16bc-497a-aeb1-0a7468414155 Simpler Service Decoration

Syntax

# config/services.yaml
services:
    App\Mailer: ~

    # Before
    App\SpecialMailer:
        decorates: App\Mailer
        arguments: ['@App\SpecialMailer.inner']

    # After
    App\SpecialMailer:
        decorates: App\Mailer
        arguments: ['@.inner']