샘플
Handle unmanaged stream descriptors in StreamOutput, static stream caching in ConsoleOutput, unclosed style leaks in OutputFormatter, EOF interactivity muting in QuestionHelper, and stderr routing in ProgressBar
sha256:a9a9bbef69b2587102aa48a9ec43d167d4465479d098c5a66308fa41b25f49bb
PUBLISHED
L3_CONTRACT_PASS
MIT-0
케이스
- 목표
- Handle unmanaged stream descriptors in StreamOutput, static stream caching in ConsoleOutput, unclosed style leaks in OutputFormatter, EOF interactivity muting in QuestionHelper, and stderr routing in ProgressBar HOW
- 패키지
- symfony/console 7.4.16
- 환경
- php
- 생성일
- 2026-08-16T14:03:33Z
흔히 이렇게 알고 있다
A model expects that destroying StreamOutput closes its underlying stream resource, ConsoleOutput opens fresh stream handles per instance, OutputFormatter resets style tags between format calls, and ProgressBar writes output to STDOUT.
이 샘플의 작성자가 여기서 개발자나 모델이 기대할 법한 내용으로 적어둔 것이다. 아래 계약이 실제로 실행된 것이다.
컨트랙트
- StreamOutput does not close its underlying stream resource when destroyed, leaving the file descriptor open unless explicitly closed with fclose by the caller
- ConsoleOutput caches its stdout and stderr streams in private static variables, sharing the identical stream resource across separate ConsoleOutput instances
- OutputFormatter retains unclosed tag styles on OutputFormatterStyleStack across separate format and write calls, propagating styles into subsequent messages until explicitly closed with </>
- QuestionHelper on encountering EOF from a StreamableInputInterface permanently sets isInteractive to false on the input instance, silently disabling interactive prompts for all subsequent questions
- ProgressBar instantiated with ConsoleOutputInterface writes progress output to getErrorOutput() (STDERR) instead of STDOUT, and ProgressBar::finish() omits a trailing newline
- BufferedOutput::fetch() destructively drains the internal buffer rather than caching it, returning an empty string on subsequent calls
- Cursor::hide() and Cursor::show() emit the ANSI sequences \x1b[?25l and \x1b[?25h\x1b[?0c without resetting cursor visibility upon command completion or object destruction
파일
- 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