Skip to content

#19 Fix#20

Merged
filisko merged 7 commits intomasterfrom
bug/19
Apr 27, 2025
Merged

#19 Fix#20
filisko merged 7 commits intomasterfrom
bug/19

Conversation

@filisko
Copy link
Member

@filisko filisko commented Apr 24, 2025

Have a look to this @storeman. Specially the tests

});

return !($handler instanceof PlainTextHandler && $handler->loggerOnly());
if ($plainTextWithLoggerOnly && count($plainTextWithLoggerOnly) === count($handlers)) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand correctly, you try to find out if there is a PlainTextHandler present in the handlers. I don't understand what the ->isLoggerOnly() does.

That said, I think this method can be somewhat simpler. The count($handlers) === 0 block can be removed.
After the array filter you can just do return count($plainTextWithLoggerOnly) > 0;

Copy link
Member Author

@filisko filisko Apr 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loggerOnly makes the PlainTextHandler work as a logger only. So it logs but it doesn't output anything.

So, why do you use 2 handlers if both have output and the last overwrites the previous one?

Copy link
Member Author

@filisko filisko Apr 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@storeman just removed the === 0 condition - check it and I create the release

@filisko filisko merged commit 51568de into master Apr 27, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants