Skip to content

Conversation

@dunglas
Copy link
Member

@dunglas dunglas commented Nov 4, 2015

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets n/a
License MIT
Doc PR n/a

Related to symfony/symfony#16464. cc @weaverryan

@weaverryan
Copy link
Member

👍

The idea is that when a bundle introduces multiple services with the same interface/class, that service cannot be auto-wired as a dependency into user-land services, as the container doesn't know which service to auto-wire. By adding this, the main logger will be auto-wired, which is really what you want. The user can still overwrite this in their code by creating a new service with this interface and setting its auto-write type.

@dunglas I assume that the monolog.logger tag would still change the auto-wired @logger service? http://symfony.com/doc/current/reference/dic_tags.html#monolog-logger

@dunglas
Copy link
Member Author

dunglas commented Nov 4, 2015

Yes I've tried it it works.

Seldaek added a commit that referenced this pull request Nov 18, 2015
Allow to autowire the default logger
@Seldaek Seldaek merged commit 2a3b1db into symfony:master Nov 18, 2015
@Seldaek
Copy link
Member

Seldaek commented Nov 18, 2015

Thanks!

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.

3 participants