Skip to content

Conversation

martijngastkemper
Copy link
Contributor

In services.yml the type resolver is an argument, but CharacterResolver doesn't have a __construct to handle that argument. It does work, because CharacterResolver is container aware. Replacing container aware by a construct makes the class look nice and the example more clear.

Service must not be container aware.
Copy link
Contributor

@mcg-web mcg-web left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @martijngastkemper 👍 . but both are correct, the container is injected for resolvers implementing Symfony\Component\DependencyInjection\ContainerAwareInterface.

@mcg-web mcg-web merged commit 289305e into overblog:master Jun 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants