With this simplified example:
new Psr\Log\Test\TestLogger()->hasInfo([
'message' => 'Message',
'context' => [
'foo' => 'Foo',
'bar' => 123,
],
]);
After updating to 1.2.0 and getting the changes from #15 I'm getting this error from PHPStan:
Parameter #1 $record of method Psr\Log\Test\TestLogger::hasInfo() expects array{level: string, message: string|Stringable, context: array{exception?: Throwable}}|string, array{message: 'Message', context: array{foo: 'Foo', bar: 123}} given.
🪪 argument.type
💡 Type #1 from the union: Array does not have offset 'level'.
Considering the level is a separate argument for TestLogger::hasRecord() and the key from the array is not used at all here, the log_record_array type seems like it might not be the best array shape for the $record argument.