[GH-ISSUE #540] Provide a Processor interface #187

Closed
opened 2026-03-04 02:13:00 +03:00 by kerem · 2 comments
Owner

Originally created by @tremby on GitHub (Apr 13, 2015).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/540

It would be useful to have an interface which Processor classes implement. They are mostly loose classes with no inheritance right now, so determining that a given object is a Processor is impossible.

Originally created by @tremby on GitHub (Apr 13, 2015). Original GitHub issue: https://github.com/Seldaek/monolog/issues/540 It would be useful to have an interface which Processor classes implement. They are mostly loose classes with no inheritance right now, so determining that a given object is a Processor is impossible.
kerem closed this issue 2026-03-04 02:13:00 +03:00
Author
Owner

@stof commented on GitHub (Apr 13, 2015):

This would be a BC break, and remove flexibility. Processors are currently any callable. If Monolog was requiring PHP 5.4+, the method adding them would have a callable typehint.

<!-- gh-comment-id:92527481 --> @stof commented on GitHub (Apr 13, 2015): This would be a BC break, and remove flexibility. Processors are currently any callable. If Monolog was requiring PHP 5.4+, the method adding them would have a `callable` typehint.
Author
Owner

@tremby commented on GitHub (Apr 13, 2015):

Ah, so all I need to do is run is_callable() on it, and if that's true, which it is if the __invoke method is declared, it can count as a processor. So everything I want to do is already possible. Thanks for clarifying.

<!-- gh-comment-id:92528395 --> @tremby commented on GitHub (Apr 13, 2015): Ah, so all I need to do is run `is_callable()` on it, and if that's true, which it is if the `__invoke` method is declared, it can count as a processor. So everything I want to do is already possible. Thanks for clarifying.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/monolog#187
No description provided.