diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-17 21:24:24 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-17 21:24:34 +0900 |
| commit | e752ff0a7e21334c0b9b9e1b87d4965ea8760fd5 (patch) | |
| tree | 55345a77a769293930f3e77c02ba61eb0af4ffc4 /crates/shirabe/src/command/base_command.rs | |
| parent | 07c1ef1aea3a0c60484fdada89de7c5a3b7cf7c6 (diff) | |
| download | php-shirabe-e752ff0a7e21334c0b9b9e1b87d4965ea8760fd5.tar.gz php-shirabe-e752ff0a7e21334c0b9b9e1b87d4965ea8760fd5.tar.zst php-shirabe-e752ff0a7e21334c0b9b9e1b87d4965ea8760fd5.zip | |
fix(compile): convert Command struct to trait
Symfony Command was a struct but used as dyn Trait (Box<dyn Command>)
in console/application.rs. Convert it to a trait with CommandBase as
the concrete stub, and add impl Command for all Composer commands.
Diffstat (limited to 'crates/shirabe/src/command/base_command.rs')
| -rw-r--r-- | crates/shirabe/src/command/base_command.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/shirabe/src/command/base_command.rs b/crates/shirabe/src/command/base_command.rs index c9f79b7..428cc65 100644 --- a/crates/shirabe/src/command/base_command.rs +++ b/crates/shirabe/src/command/base_command.rs @@ -3,6 +3,7 @@ use anyhow::Result; use indexmap::IndexMap; use shirabe_external_packages::symfony::component::console::command::command::Command; +use shirabe_external_packages::symfony::component::console::command::command::CommandBase; use shirabe_external_packages::symfony::component::console::completion::completion_input::CompletionInput; use shirabe_external_packages::symfony::component::console::completion::completion_suggestions::CompletionSuggestions; use shirabe_external_packages::symfony::component::console::helper::table::Table; @@ -35,8 +36,8 @@ use crate::util::platform::Platform; /// Base class for Composer commands pub trait BaseCommand { - fn inner(&self) -> &Command; - fn inner_mut(&mut self) -> &mut Command; + fn inner(&self) -> &CommandBase; + fn inner_mut(&mut self) -> &mut CommandBase; fn composer(&self) -> Option<&Composer>; fn composer_mut(&mut self) -> &mut Option<Composer>; fn io(&self) -> Option<&dyn IOInterface>; |
