mmarton
changed the title
multiple env processing and DI problem in monolog mailer config
env processing and DI problem in monolog mailer config qith multiple addresses
Dec 14, 2020
mmarton
changed the title
env processing and DI problem in monolog mailer config qith multiple addresses
env processing and DI problem in monolog mailer config with multiple addresses
Dec 14, 2020
Hi!
Symfony version(s) affected: 5.2
Description
I'd like to set multiple to addresses to monolog email handler from env config.
I have the following monolog configuration:
and env file with:
EXCEPTION_EMAIL_ADDRESSES='["address1@email.com","address2@email.com"]'
problem:
the config normalizer runs before the env processing here
https://github.com/symfony/monolog-bundle/blob/master/DependencyInjection/Configuration.php#L610
and sees my to_email as a string: string(79) "env_777f8e4b1e96b241_EXCEPTION_EMAIL_ADDRESSES_1787d55fa4dbd016b8b6bb36ab5f3002"
and wraps it into an array
passing an array of email directly to the config works as expected:
to_email: ["address1@email.com","address2@email.com"]
The text was updated successfully, but these errors were encountered: