Skip to content

Conversation

@finwe
Copy link
Contributor

@finwe finwe commented Feb 20, 2024

When having multiple implementations of LoggerInterface in the container configuration, I cannot circumvent the Multiple services of type Psr\Log\LoggerInterface found error from LoggerPass even when loggers are explicitly set in the configuration, because the $builder->getByType call throws even before the config condition is processed.

This is a simple attempt to postpone the exception after the config is handled.

I have added the false flag so that the getByType does not throw on the implementation not existing, as this condition is later handled by defaulting to NullLogger. This flag only handles this case, not the case of multiple existing services.

@f3l1x
Copy link
Member

f3l1x commented May 24, 2024

Can you show me your configuration (neon) or create failing test? I am not facing that issue.

@f3l1x
Copy link
Member

f3l1x commented Jul 18, 2024

Ping @finwe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants