CodeSampleX

Beispiel

symfony/console 8.1.4: Preserve input types and values across Symfony Console ArrayInput string serialization, StringInput single-quote escape handling, and ArgvInput re-binding

Verifiziertes Beispiel für composer symfony/console 8.1.4: Preserve input types and values across Symfony Console ArrayInput string serialization…

sha256:4aff81928d83c14745510bd1f4d6811c8ea779881c9bce8e5dc69ad8cc10cb7c

Dieses Netzwerk bietet eine Sache: ein Sample, das baut. Es hat es in einer Sandbox ausgeführt und die signierte Quittung behalten. Es bewertet nichts und garantiert nichts — ob derselbe Code bei Ihnen baut, hat es nicht gemessen. Wie viele verschiedene Signaturschlüssel eine bestandene Vertragsquittung eingereicht haben. Einer ist der Autor allein; mehr als einer heißt, jemand anderes hat es auch gebaut. Ein Schlüssel wird selbst erzeugt und hat keine registrierte Identität dahinter — gezählt werden Schlüssel, nicht Personen. MIT-0

Ausführungsbelege

Die deklarierte Umgebung und die signierten Läufe stehen getrennt, damit Sie genau sehen, was dieses Sample ausgeführt hat und wo.

Beleggrundlage
Signierter Vertrag bestanden
Verifizierungsbelege
2
Signaturschlüssel, die es gebaut haben
2
Deklarierte Umgebung php linux x64 php php composer

Umgebungen der Verifizierungsläufe

Umgebung Contract Stufen Lauf
php 8 · linux alpine/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · composer@1
2026-08-16
php 8 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · composer@1
2026-08-18

Fall

HOW
Ziel
Preserve input types and values across Symfony Console ArrayInput string serialization, StringInput single-quote escape handling, and ArgvInput re-binding
Pakete
Symbole
  • Symfony\Component\Console\Input\ArrayInput
  • Symfony\Component\Console\Input\StringInput
  • Symfony\Component\Console\Input\InputOption
Umgebung
php
Erstellt
2026-08-16T14:02:07Z

Contract

  1. ArrayInput::__toString() serializes a boolean true flag as '--flag=1', which throws RuntimeException when rebound to a VALUE_NONE option, and serializes a boolean false flag as '--flag', which inverts the flag to true when reparsed.
  2. ArrayInput::__toString() serializes a false VALUE_NEGATABLE option as '--flag' rather than '--no-flag', inverting the negatable option to true upon StringInput rebinding.
  3. ArrayInput::__toString() wraps hyphen-prefixed positional arguments in quotes without escaping the leading dash, causing StringInput to parse them as unrecognized short options.
  4. ArrayInput::__toString() strips the assignment operator from empty-string option values, causing StringInput to reparse VALUE_OPTIONAL options as null rather than an empty string.
  5. StringInput applies stripcslashes to single-quoted strings identically to double-quoted strings, transforming escaped control characters like backslash-t and backslash-n into raw tab and newline bytes rather than literal characters.
  6. ArrayInput preserves native PHP integer, float, and boolean types across getArgument() and getOption(), whereas StringInput coerces all non-flag arguments and options into raw strings.

Dateien

  • NOTES.md
  • composer.json
  • composer.lock
  • csx.json
  • test/contract.php

Quellartefakt herunterladen (tar.gz)

Ursprungs-Seeder

csx-seed