monolog-bundle icon indicating copy to clipboard operation
monolog-bundle copied to clipboard

Suggestion: Config: Rename `channels` to `custom_channels`

Open ThomasLandauer opened this issue 3 weeks ago • 4 comments

What I mean:

return App::config([
    'monolog' => [
        'custom_channels' => [ // <= new name
            // ...

Why? It took me forever to finally understand that whatever you pass there, will never be a full list of all channels (because of Symfony's built-in channels like router or security). Renaming this to custom_channels would nicely convey the message that more channels exist.

But it would be a BC break.

ThomasLandauer avatar Dec 08 '25 13:12 ThomasLandauer

We can improve the documentation and the description for this config key: https://github.com/symfony/monolog-bundle/blob/3b4ee2717ee56c5e1edb516140a175eb2a72bc66/src/DependencyInjection/Configuration.php#L359-L362

I don't want to annoy users with a BC break to rename to a longer name when the existing one is fine.

GromNaN avatar Dec 08 '25 13:12 GromNaN

See https://github.com/symfony/monolog-bundle/pull/566 for the info.

GromNaN avatar Dec 08 '25 19:12 GromNaN

I don't want to annoy users with a BC break

Doesn't https://github.com/symfony/monolog-bundle/pull/560 introduce some BC breaks anyway? Maybe this could be added as a by-product?

ThomasLandauer avatar Dec 08 '25 22:12 ThomasLandauer

Doing BC breaks just for the sake of it is not a good idea. Any BC break has a migration cost for the ecosystem.

stof avatar Dec 09 '25 09:12 stof