サンプル
8.1.0 to 8.1.1: prove that ChoiceQuestion prompts render defaults containing formatter tags as rendered choice labels.
sha256:ae1a499897750c8baef2d33ae92fd9a2c03aa1cc45eba0e27941d6eae190bf20
PUBLISHED
L3_CONTRACT_PASS
MIT-0
ケース
- ゴール
- 8.1.0 to 8.1.1: prove that ChoiceQuestion prompts render defaults containing formatter tags as rendered choice labels. HOW
- パッケージ
- symfony/console 8.1.1
- 環境
- php
- 作成日
- 2026-08-16T17:42:19Z
よくある思い込み
A developer expects the default ChoiceQuestion label to be escaped, so `<comment>...` appears in the prompt brackets.
このサンプルの作者が、ここで開発者やモデルが期待するであろうこととして記録したもの。下の契約が実際に実行されたものだ。
コントラクト
- In 8.1.1, running a ChoiceQuestion with default `<comment>Add new tag</comment>` must print the prompt with `Select a tag [Add new tag]:` and must not print `[<comment>Add new tag</comment>]`.
- Asking that question with blank input must return `<comment>Add new tag</comment>`.
ファイル
- NOTES.md
- composer.json
- composer.lock
- csx.json
- test/contract.php
検証済みアーティファクトをダウンロード (tar.gz) — 契約が実行された正確なバイト列
オリジンシーダー
検証レシート
- php 8 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · composer@1 · 2026-08-16 · ed25519:d91480838ac982c9