Skip to content

Conversation

@sasezaki
Copy link
Contributor

fix #18

@sasezaki sasezaki changed the title array offset should not be guarantee for hasRecord() array offset (level, message, context) should not be guarantee for hasRecord() Oct 29, 2025
@sasezaki
Copy link
Contributor Author

sasezaki commented Nov 9, 2025

Could anyone check this, please ? @Seldaek @Jean85 or other @php-fig members ..
current bug is causing the problem like doctrine/dbal#7202

*
* It records all records and gives you access to them for verification.
*
* @psalm-type log_record_array array{level: string, message: string|\Stringable, context: array{exception?: \Throwable}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Should not fix the context type here as well? It can contain more than exception

Copy link
Contributor

Choose a reason for hiding this comment

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

There's #17 and #21 for this Discussion already. You might want to join there. 🙂

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah right thanks, let's merge this then

@Seldaek Seldaek merged commit fde37ea into php-fig:main Nov 11, 2025
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.

level key of log_record_array Psalm type causes SA issues in TestLogger::has*() methods

4 participants