mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-26 08:05:53 +03:00
[GH-ISSUE #355] AmqpHandler should not enforce exchange name #120
Labels
No labels
Bug
Documentation
Feature
Needs Work
Support
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/monolog#120
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jcart on GitHub (Apr 11, 2014).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/355
When creating an AmqpHandler, it's enforced in constructor to provide an exchange_name as part of configuration.
This is something that should be done outside of the scope of AmqpHandler and done as part of AmqpExchange DI configuration (via setter injection).
Enforcing this as part of AmqpHandler forces an already configured AmqpExchange to duplicate configuration which is error prone.
@stof commented on GitHub (Apr 11, 2014):
this looks indeed weird
@Seldaek commented on GitHub (Apr 20, 2014):
Agreed, kinda makes no sense, but I'll schedule this for 2.0 since it'd be breaking BC to remove or even ignore the argument
@Seldaek commented on GitHub (May 26, 2016):
After digging into this a bit, it seems only PhpAmqpLib was actually needing/using that $exchange argument, but it seems optional at the PhpAmqpLib level. So I made it default to null and it's also not used at all anymore for the amqp extension users.
I hope this approach makes sense. Ping @postalservice14 and @nubeiro in case you have an opinion here that'd be great.