From fe15d4dba4530f574856a6c443a3f665aa5abe7a Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 14 Jun 2026 00:15:52 +0900 Subject: feat(console): implement get_command_name_before_binding via input clone Replace the todo!() stub with the real Symfony logic: clone the input, bind it against the application definition (ignoring binding errors), and read the first argument so the command name is detected even when global options precede it. Add a dup() method to InputInterface to model PHP's clone, derive Clone on the input types, and treat InvalidArgument/InvalidOption/MissingInput as ignorable ExceptionInterface errors during the pre-binding probe. --- crates/shirabe-external-packages/src/symfony/console/input/input.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/shirabe-external-packages/src/symfony/console/input/input.rs') diff --git a/crates/shirabe-external-packages/src/symfony/console/input/input.rs b/crates/shirabe-external-packages/src/symfony/console/input/input.rs index 2c9a3a6..2881ccb 100644 --- a/crates/shirabe-external-packages/src/symfony/console/input/input.rs +++ b/crates/shirabe-external-packages/src/symfony/console/input/input.rs @@ -11,7 +11,7 @@ use shirabe_php_shim::PhpMixed; /// * `ArgvInput`: The input comes from the CLI arguments (argv) /// * `StringInput`: The input is provided as a string /// * `ArrayInput`: The input is provided as an array -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct Input { pub(crate) definition: InputDefinition, pub(crate) stream: PhpMixed, -- cgit v1.3.1