From caf8dee0c73a7a680d93bf943cade43632e74ca7 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 2 Aug 2026 11:13:00 +0900 Subject: feat(symfony-console): restore CompletionInput's ArgvInput inheritance surface PHP's CompletionInput extends ArgvInput, so it can be passed anywhere an InputInterface is expected (GlobalCommand::complete binds and forwards it, suggestion closures read options and arguments from it). The Rust port only embedded the ArgvInput, so none of that surface was reachable. Implement InputInterface by forwarding to the embedded ArgvInput, with bind dispatching to the specialized CompletionInput::bind (PHP's virtual dispatch), derive Clone, and teach GlobalCommand::input_to_string the CompletionInput branch. Co-Authored-By: Claude Fable 5 --- crates/shirabe/src/command/global_command.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'crates/shirabe') diff --git a/crates/shirabe/src/command/global_command.rs b/crates/shirabe/src/command/global_command.rs index e70a2082..0414fd76 100644 --- a/crates/shirabe/src/command/global_command.rs +++ b/crates/shirabe/src/command/global_command.rs @@ -10,6 +10,7 @@ use crate::util::Filesystem; use crate::util::Platform; use shirabe_external_packages::composer::pcre::Preg; use shirabe_external_packages::symfony::console::command::command::Command; +use shirabe_external_packages::symfony::console::completion::completion_input::CompletionInput; use shirabe_external_packages::symfony::console::input::ArgvInput; use shirabe_external_packages::symfony::console::input::ArrayInput; use shirabe_external_packages::symfony::console::input::InputInterface; @@ -54,6 +55,8 @@ impl GlobalCommand { Ok(array_input.to_string()) } else if let Some(string_input) = input_any.downcast_ref::() { Ok(string_input.to_string()) + } else if let Some(completion_input) = input_any.downcast_ref::() { + Ok(completion_input.to_string()) } else { Err(LogicException { message: "Expected an Input instance that is stringable".to_string(), -- cgit v1.3.1