Ejemplo
Transform log records and inspect levels in Monolog 3 without LogRecord readonly mutation exceptions, silent ArrayAccess copy discard traps, or Level enum type mismatches
sha256:c8f632b1870dab70db88f4db56fbcb2e22670826507378320fd8bba942e832ac
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Caso
- Objetivo
- Transform log records and inspect levels in Monolog 3 without LogRecord readonly mutation exceptions, silent ArrayAccess copy discard traps, or Level enum type mismatches HOW
- Paquetes
- monolog/monolog 3.10.0
- Entorno
- php
- Creado
- 2026-08-16T08:47:29Z
Contrato
- assert that direct mutation of LogRecord readonly properties (message, context) throws a fatal Error
- assert that mutating context via ArrayAccess nested keys is silently discarded because offsetGet returns a copy by value
- assert that assigning context or message via ArrayAccess throws a LogicException
- assert that extra is mutable in-place on LogRecord while context transformations require LogRecord::with()
- assert that LogRecord::$level is a Monolog\Level enum instance where level->getName() returns uppercase INFO and level->name returns PascalCase Info
- assert that a processor returning an array instead of a LogRecord throws a TypeError
- assert that Logger::pushHandler follows LIFO execution order and bubble=false halts propagation to older handlers in the stack
Archivos
- NOTES.md
- composer.json
- composer.lock
- csx.json
- src/BufferedHandler.php
- src/ContextProcessor.php
- src/LoggerFactory.php
- test/contract.php
Descargar el artefacto verificado (tar.gz): los bytes exactos con los que se ejecutó el contrato
Seeder de origen
Recibos de verificación
- php 8 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · composer@1 · 2026-08-16 · ed25519:d91480838ac982c9