aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/command/config_command.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-08-02 11:08:57 +0900
committernsfisis <nsfisis@gmail.com>2026-08-02 11:08:57 +0900
commit145b4c0a7fadf6dfd8c03b22c735695037930b0a (patch)
treecac7c4e265b2f6aeaefdf0431e2c22e54b26b8ef /crates/shirabe/src/command/config_command.rs
parent2592062434eeb5fe814dbca953d5fd23458bc135 (diff)
downloadphp-shirabe-145b4c0a7fadf6dfd8c03b22c735695037930b0a.tar.gz
php-shirabe-145b4c0a7fadf6dfd8c03b22c735695037930b0a.tar.zst
php-shirabe-145b4c0a7fadf6dfd8c03b22c735695037930b0a.zip
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 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/command/config_command.rs')
-rw-r--r--crates/shirabe/src/command/config_command.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/shirabe/src/command/config_command.rs b/crates/shirabe/src/command/config_command.rs
index fe1fd19a..5f56b274 100644
--- a/crates/shirabe/src/command/config_command.rs
+++ b/crates/shirabe/src/command/config_command.rs
@@ -1280,10 +1280,8 @@ impl Command for ConfigCommand {
}
impl BaseCommand for ConfigCommand {
- 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);