From d541e548671b0e85e8a0fc36c88593490c6cfc16 Mon Sep 17 00:00:00 2001 From: Matthias Pigulla Date: Fri, 20 Dec 2019 09:56:30 +0000 Subject: [PATCH] Add classname-based service ids to simplify autowiring --- Resources/config/services.yml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/Resources/config/services.yml b/Resources/config/services.yml index d91079a..246f43b 100644 --- a/Resources/config/services.yml +++ b/Resources/config/services.yml @@ -4,21 +4,31 @@ parameters: phumbor.twig.extension.class: Jb\Bundle\PhumborBundle\Twig\PhumborExtension services: - phumbor.url.builder_factory: + Thumbor\Url\BuilderFactory: class: '%phumbor.url.builder_factory.class%' arguments: - '%phumbor.server.url%' - '%phumbor.secret%' - phumbor.url.transformer: + Jb\Bundle\PhumborBundle\Transformer\BaseTransformer: class: '%phumbor.url.transformer.class%' arguments: - - '@phumbor.url.builder_factory' + - '@Thumbor\Url\BuilderFactory' - '%phumbor.transformations%' - phumbor.twig.extension: + Jb\Bundle\PhumborBundle\Twig\PhumborExtension: class: '%phumbor.twig.extension.class%' arguments: - - '@phumbor.url.transformer' + - '@Jb\Bundle\PhumborBundle\Transformer\BaseTransformer' tags: - { name: twig.extension } + + # Service aliases for BC: + phumbor.url.builder_factory: + alias: Thumbor\Url\BuilderFactory + + phumbor.url.transformer: + alias: Jb\Bundle\PhumborBundle\Transformer\BaseTransformer + + phumbor.twig.extension: + alias: Jb\Bundle\PhumborBundle\Twig\PhumborExtension