Beispiel
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
Fall
- Ziel
- 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
- Pakete
- monolog/monolog 3.10.0
- Umgebung
- php
- Erstellt
- 2026-08-16T08:47:29Z
Contract
- 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
Dateien
- NOTES.md
- composer.json
- composer.lock
- csx.json
- src/BufferedHandler.php
- src/ContextProcessor.php
- src/LoggerFactory.php
- test/contract.php
Verifiziertes Artefakt herunterladen (tar.gz) — genau die Bytes, gegen die der Contract lief
Ursprungs-Seeder
Verifizierungsbelege
- php 8 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · composer@1 · 2026-08-16 · ed25519:d91480838ac982c9