From 145b4c0a7fadf6dfd8c03b22c735695037930b0a Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 2 Aug 2026 11:08:57 +0900 Subject: feat(console-input): port the suggested-values backport onto InputArgument/InputOption Composer backports symfony/console 6.1's $suggestedValues parameter in Composer\Console\Input\{InputArgument,InputOption}; the Rust newtypes had dropped it. PHP closures are bound to the command ($this), but a command cannot capture a handle to itself while configure() runs inside new(), so the closure receives the bound command as an explicit `this` argument at call time instead. - add SuggestedValues (list | this-taking closure) and wire it through InputArgument::new5 / InputOption::new6 and their complete() methods - track Composer-typed definition entries by name in BaseCommandData side maps, standing in for PHP's instanceof checks (set_definition converts entries to the Symfony types for storage) - add base_command_complete, the BaseCommand::complete dispatch shared by every Composer command - introduce BaseCommand::base_command_data and make command_data a default method on top of it Co-Authored-By: Claude Fable 5 --- crates/shirabe/src/command/search_command.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'crates/shirabe/src/command/search_command.rs') diff --git a/crates/shirabe/src/command/search_command.rs b/crates/shirabe/src/command/search_command.rs index 83c7a8bf..0d5fa4be 100644 --- a/crates/shirabe/src/command/search_command.rs +++ b/crates/shirabe/src/command/search_command.rs @@ -308,10 +308,8 @@ impl Command for SearchCommand { } impl BaseCommand for SearchCommand { - fn command_data( - &self, - ) -> &shirabe_external_packages::symfony::console::command::command::CommandData { - self.base_command_data.command_data() + fn base_command_data(&self) -> &crate::command::BaseCommandData { + &self.base_command_data } crate::delegate_base_command_trait_impls_to_inner!(base_command_data); -- cgit v1.3.1