Monolog 3 has changed the signature of the AbstractProcessingHandler::write method from an array to a record object, leading to type errors and static analysis errors.
If you want to stay backwards-compatible, you could avoid typing write method and accept both arrays or records. Monolog\LogRecord implements the ArrayAccess interface, so the method body can stay the same
Monolog 3 has changed the signature of the
AbstractProcessingHandler::writemethod from an array to a record object, leading to type errors and static analysis errors.If you want to stay backwards-compatible, you could avoid typing
writemethod and accept both arrays or records.Monolog\LogRecordimplements theArrayAccessinterface, so the method body can stay the same