odan / slim4-skeleton

A Slim 4 Skeleton
https://odan.github.io/slim4-skeleton/
MIT License
439 stars 80 forks source link

Error: Parameter #3 $level of class Monolog\Handler\RotatingFileHandler #78

Closed ll-ld closed 3 years ago

ll-ld commented 3 years ago

image

Hello, I get this error after a fresh installation/repo creation of slim4-skeleton and cant find any help how to solve this. pls help me out with some advice, thank you in advance.

odan commented 3 years ago

Thanks for posting this error message. This is a known issue, see here:

It appears to be a bug in the DocBlocks of Monolog. See here:

The DocBlock does not match with the actual constructor parameters.

When I fix the DocBlock in RotatingFileHandler and StreamHandler manually, the phpstan errors are gone.

The best way to fix this would be to create a PR in the monolog repository.

Edit: I created an PR to fix this issue in Monolog.

odan commented 3 years ago

As a quick fix you could add /** @phpstan-ignore-next-line */ to ignore this phpstan error.

See here: https://github.com/odan/slim4-skeleton/commit/cfce80023b2c9805e8c5bf2bc5bf2b39cbb9a9c1