Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Wrong phpdoc for $message parameters #56

Closed
alex-jonas opened this issue Sep 12, 2024 · 1 comment
Closed

Wrong phpdoc for $message parameters #56

alex-jonas opened this issue Sep 12, 2024 · 1 comment
Labels
Bug Something isn't working

Comments

@alex-jonas
Copy link

Bug Report

Q A
Version(s) all?

Summary

The $message params for the methods in LoggerInterface have the wrong type annotation (Phpdoc). It's limited to string although Logger::log() does also accept Stringables and Arrays as message.

If you use the latter types, you must define exceptions in phpstan.

Current behavior

Wrong documentation on the LoggerInterface-methods for param $message. E.g.

    /**
     * @param string $message
     * @param array|Traversable $extra
     * @return LoggerInterface
     */
    public function crit($message, $extra = []);

How to reproduce

Log an Exception-Object as $message.

Expected behavior

Documentation reflects correctly which types are handled.

@alex-jonas alex-jonas added the Bug Something isn't working label Sep 12, 2024
@laminas-bot
Copy link
Contributor

This package is considered feature-complete, and is now in security-only maintenance mode, following a decision by the Technical Steering Committee.
If you have a security issue, please follow our security reporting guidelines.
If you wish to take on the role of maintainer, please nominate yourself

If you are looking for an actively maintained package alternative, we recommend:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants