[GH-ISSUE #1900] HandlerInterface::isHandling could have better naming #816

Closed
opened 2026-03-04 03:00:55 +03:00 by kerem · 1 comment
Owner

Originally created by @ghost on GitHub (Jul 25, 2024).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/1900

Hi, I have a little problem with HandlerInterface::isHandling method naming and I'm often mislead by it.

For me isHandling means (the first is my default, the second is alternative understanding)

  1. this handler is handling a log record at the moment.
    OR
  2. this handler is handling a log record but not in a sense that in does it at the moment but in a sense that this log record belongs only to this handler.

However what it really does is that this handler supports (i.e. will log) this log record.
I know the doc block on the method gives some explaination but one can't remember all the doc blocks and it's the class API (e.g. method naming) what a developer works with daily so better method naming should be our priority.

I hope I've described my POV understandable.

I know the naming change would be a big BC break so I'm not forcing to change it right away. It's more like a question for maintainers whether they agree with my POV and maybe in some future major release this could be done.

Originally created by @ghost on GitHub (Jul 25, 2024). Original GitHub issue: https://github.com/Seldaek/monolog/issues/1900 Hi, I have a little problem with HandlerInterface::isHandling method naming and I'm often mislead by it. For me `isHandling` means (the first is my default, the second is alternative understanding) 1. this handler is handling a log record **at the moment**. OR 2. this handler is handling a log record but not in a sense that in does it at the moment but in a sense that this log record belongs **only** to this handler. However what it really does is that this handler **supports** (i.e. will log) this log record. I know the doc block on the method gives some explaination but one can't remember all the doc blocks and it's the class API (e.g. method naming) what a developer works with daily so better method naming should be our priority. I hope I've described my POV understandable. I know the naming change would be a big BC break so I'm not forcing to change it right away. It's more like a question for maintainers whether they agree with my POV and maybe in some future major release this could be done.
kerem 2026-03-04 03:00:55 +03:00
  • closed this issue
  • added the
    Feature
    label
Author
Owner

@Seldaek commented on GitHub (Nov 9, 2024):

Probably not going to change this no..

<!-- gh-comment-id:2466216068 --> @Seldaek commented on GitHub (Nov 9, 2024): Probably not going to change this no..
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#816
No description provided.