Closed ro0NL closed 2 weeks ago
See the build failure. It is done like that to allow the child class (LineFormatter) to override this. It's very difficult to have strict types for NormalizerFormatter as it is extended for various different use cases.
@Seldaek got ya. updated.
Sorry not sure what you updated? :) Still failing
yeah ok. i dont feel like doing the phpstan bookkeeping. sorry.
we've casted JsonFormatter::normalize
on our side.
Yeah that's fine by me.. I don't know which is best here tbh, we gotta ignore some errors somewhere, but maybe for lib consumers it would be better if we did it like you had and ignore the JsonFormatter extension error. But I guess your array-key
change should be applied still right? Is array-key
equivalent to string|int
? I can look at doing the change and updating the baseline.
psalm describes it as
array-key is the supertype (but not a union) of int and string.
so yes just a union in practice
OK I think this works https://github.com/Seldaek/monolog/commit/e94000419394ff1bec801dad310432228f9fc19c
I dont see how
normalizeException
can return a string.