aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-php-rpc/src/lib.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-08-01 20:51:40 +0900
committernsfisis <nsfisis@gmail.com>2026-08-01 20:51:40 +0900
commite5e6cc6807c9fbbef883ffe0eec9eed477d5bee3 (patch)
tree8d5f1ff760e56b370c53ac0311c219ee7a7988c2 /crates/shirabe-php-rpc/src/lib.rs
parent06d2c5c884eee0b5b663730f4d379a7ceae3a8e4 (diff)
downloadphp-shirabe-e5e6cc6807c9fbbef883ffe0eec9eed477d5bee3.tar.gz
php-shirabe-e5e6cc6807c9fbbef883ffe0eec9eed477d5bee3.tar.zst
php-shirabe-e5e6cc6807c9fbbef883ffe0eec9eed477d5bee3.zip
feat(symfony-console): implement interactive question/style helpers
Resolve the remaining todo!()s in SymfonyStyle, OutputStyle, QuestionHelper and SymfonyQuestionHelper: * Wire up the virtual dispatch PHP performs for the protected writePrompt()/writeError() overrides, following the codebase's established inheritance idiom (Command, ArchiveDownloader): the base class becomes a trait (QuestionHelperInterface, named after the QuestionInterface precedent) whose provided methods ask/do_ask/ validate_attempts carry the template logic and late-bind the write_prompt/write_error hooks through Self, with inner()/inner_mut() reaching the base-class state. SymfonyQuestionHelper overrides the hooks as plain trait-impl methods, mirroring PHP's protected-method overriding, so SymfonyStyle-driven questions now render the Symfony Style Guide prompt. * Type definition_list input as an enum (string|array|TableSeparator) because PhpMixed intentionally cannot carry objects; the InvalidArgumentException branch (a LogicException) becomes unrepresentable. horizontal_table now takes typed Cells/Rows. * Propagate the MissingInputException thrown inside autocomplete() through a Result instead of aborting. * Implement as_console_output_interface via Ref::filter_map on ConsoleOutput, the interface's only implementor. * Port progressIterate eagerly, following ProgressBar::iterate. * Map __FILE__ to current_exe(): a native binary never runs from a phar, so the hiddeninput.exe relocation branch correctly never fires. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe-php-rpc/src/lib.rs')
0 files changed, 0 insertions, 0 deletions