Inject parameter instead of service

We are injecting CraueConfig service when we only need to retrieve one or two values from it.
Instead I discovered we can directly inject a value from a service in the service definition!
This commit is contained in:
Jeremy Benoist
2016-10-30 20:27:41 +01:00
parent f74061f1e1
commit 4b3c983ab8
5 changed files with 11 additions and 12 deletions

View File

@ -6,7 +6,8 @@ services:
- "@twig"
- "%scheb_two_factor.email.sender_email%"
- "%scheb_two_factor.email.sender_name%"
- "@craue_config"
- '@=service(''craue_config'').get(''wallabag_support_url'')'
- '@=service(''craue_config'').get(''wallabag_url'')'
wallabag_user.password_resetting:
class: Wallabag\UserBundle\EventListener\PasswordResettingListener