Beispiel
Show that a negatable console option has a distinct missing state in Symfony Console.
sha256:66851aa35da80cad2e2c527ec33ddb7a9ecd26f302e88b8c5ce66e44f7d9a15e
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Fall
- Ziel
- Show that a negatable console option has a distinct missing state in Symfony Console. HOW
- Pakete
- symfony/console 8.1.4
- Umgebung
- php
- Erstellt
- 2026-08-17T01:12:02Z
Häufige Annahme
A model may expect an omitted `InputOption::VALUE_NEGATABLE` option to be returned as `false`.
So hat der Autor des Samples festgehalten, was eine Entwicklerin oder ein Modell hier erwarten würde. Der Vertrag darunter ist das, was tatsächlich lief.
Contract
- When a command with `InputOption::VALUE_NEGATABLE` is executed without passing that option, `InputInterface::getOption` returns `null`.
- `CommandTester->execute(['--cache' => true])` returns `true`.
- `CommandTester->execute(['--no-cache' => true])` returns `false`.
Dateien
- NOTES.md
- composer.json
- composer.lock
- csx.json
- 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-17 · ed25519:d91480838ac982c9