diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-08-02 11:08:57 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-08-02 11:08:57 +0900 |
| commit | 145b4c0a7fadf6dfd8c03b22c735695037930b0a (patch) | |
| tree | cac7c4e265b2f6aeaefdf0431e2c22e54b26b8ef /crates/shirabe/src/command/self_update_command.rs | |
| parent | 2592062434eeb5fe814dbca953d5fd23458bc135 (diff) | |
| download | php-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/self_update_command.rs')
| -rw-r--r-- | crates/shirabe/src/command/self_update_command.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/shirabe/src/command/self_update_command.rs b/crates/shirabe/src/command/self_update_command.rs index 31d95263..29b08006 100644 --- a/crates/shirabe/src/command/self_update_command.rs +++ b/crates/shirabe/src/command/self_update_command.rs @@ -98,10 +98,8 @@ impl Command for SelfUpdateCommand { } impl BaseCommand for SelfUpdateCommand { - 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); |
