Skip to content

Commit

Permalink
Add classname-based service ids to simplify autowiring
Browse files Browse the repository at this point in the history
  • Loading branch information
mpdude committed Dec 20, 2019
1 parent c7aac0b commit d541e54
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions Resources/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d541e54

Please sign in to comment.