[GH-ISSUE #1324] Wrong DocBlock annotation in ErrorHandler::register causes static analyses to fail (again) #550

Closed
opened 2026-03-04 02:15:54 +03:00 by kerem · 4 comments
Owner

Originally created by @Aerendir on GitHub (May 10, 2019).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/1324

The full description of the problem is described at #1066 and was fixed by PR #1067 .

In version 1.23.0 the DOCblock is correct.

Also in the version 1.24.0 the code seems to be right.

But downloading the code, the code is the old one, with the wrong DOCblock that causes issues with static analysis.

This happen both downloading version 1.24.0 with composer or downloading it directly from GitHub.

Any feedback on this?

Originally created by @Aerendir on GitHub (May 10, 2019). Original GitHub issue: https://github.com/Seldaek/monolog/issues/1324 The full description of the problem is described at #1066 and was fixed by PR #1067 . In [version `1.23.0`](https://github.com/Seldaek/monolog/compare/1.23.0...master#diff-157e26b619888e5e125fcb22b919ea41R56) the DOCblock is correct. Also in the [version `1.24.0`](https://github.com/Seldaek/monolog/compare/1.24.0...master#diff-157e26b619888e5e125fcb22b919ea41R56) the code seems to be right. **But downloading the code, the code is the old one, with the wrong DOCblock that causes issues with static analysis.** This happen both downloading version `1.24.0` with composer or downloading it directly from GitHub. Any feedback on this?
kerem closed this issue 2026-03-04 02:15:54 +03:00
Author
Owner

@xabbuh commented on GitHub (May 10, 2019):

I don't see the line you mention on GitHub: https://github.com/Seldaek/monolog/blob/1.24.0/src/Monolog/ErrorHandler.php#L58

<!-- gh-comment-id:491310685 --> @xabbuh commented on GitHub (May 10, 2019): I don't see the line you mention on GitHub: https://github.com/Seldaek/monolog/blob/1.24.0/src/Monolog/ErrorHandler.php#L58
Author
Owner

@Aerendir commented on GitHub (May 10, 2019):

@xabbuh , you don't see the line? What does this means?

You should see this:

@param  int|false       $fatalLevel     a LogLevel::* constant, or false to disable fatal error handling

while it should be:

@param  string|null|false $fatalLevel        a LogLevel::* constant, null to use the default LogLevel::ALERT or false to disable fatal error handling
<!-- gh-comment-id:491326049 --> @Aerendir commented on GitHub (May 10, 2019): @xabbuh , you don't see the line? What does this means? You should see this: @param int|false $fatalLevel a LogLevel::* constant, or false to disable fatal error handling while it should be: @param string|null|false $fatalLevel a LogLevel::* constant, null to use the default LogLevel::ALERT or false to disable fatal error handling
Author
Owner

@xabbuh commented on GitHub (May 10, 2019):

What I just mean is that even when you look at the code on GitHub for the 1.4.0 tag it still contains the old code. #1067 was merged into master which is for Monolog 2 and thus this was not part of the 1.4.0 release.

<!-- gh-comment-id:491372629 --> @xabbuh commented on GitHub (May 10, 2019): What I just mean is that even when you look at the code on GitHub for the 1.4.0 tag it still contains the old code. #1067 was merged into `master` which is for Monolog 2 and thus this was not part of the 1.4.0 release.
Author
Owner

@Aerendir commented on GitHub (May 11, 2019):

@xabbuh , ok, I missed this part: thank you for the clarification! So I need to wait for the version 2 of monolog... Any ideas about the release date?

<!-- gh-comment-id:491498045 --> @Aerendir commented on GitHub (May 11, 2019): @xabbuh , ok, I missed this part: thank you for the clarification! So I need to wait for the version 2 of monolog... Any ideas about the release date?
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#550
No description provided.