aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/command/suggests_command.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-17 21:24:24 +0900
committernsfisis <nsfisis@gmail.com>2026-05-17 21:24:34 +0900
commite752ff0a7e21334c0b9b9e1b87d4965ea8760fd5 (patch)
tree55345a77a769293930f3e77c02ba61eb0af4ffc4 /crates/shirabe/src/command/suggests_command.rs
parent07c1ef1aea3a0c60484fdada89de7c5a3b7cf7c6 (diff)
downloadphp-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/suggests_command.rs')
-rw-r--r--crates/shirabe/src/command/suggests_command.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/crates/shirabe/src/command/suggests_command.rs b/crates/shirabe/src/command/suggests_command.rs
index 1f43070..09be216 100644
--- a/crates/shirabe/src/command/suggests_command.rs
+++ b/crates/shirabe/src/command/suggests_command.rs
@@ -11,6 +11,7 @@ use crate::repository::installed_repository::InstalledRepository;
use crate::repository::platform_repository::PlatformRepository;
use crate::repository::root_package_repository::RootPackageRepository;
use anyhow::Result;
+use shirabe_external_packages::symfony::component::console::command::command::CommandBase;
use shirabe_external_packages::symfony::console::output::output_interface::OutputInterface;
use shirabe_external_packages::symfony::{
component::console::command::command::Command, console::input::input_interface::InputInterface,
@@ -19,7 +20,7 @@ use shirabe_php_shim::{PhpMixed, empty, in_array};
#[derive(Debug)]
pub struct SuggestsCommand {
- inner: Command,
+ inner: CommandBase,
composer: Option<Composer>,
io: Option<Box<dyn IOInterface>>,
@@ -121,11 +122,11 @@ impl SuggestsCommand {
}
impl BaseCommand for SuggestsCommand {
- fn inner(&self) -> &Command {
+ fn inner(&self) -> &CommandBase {
&self.inner
}
- fn inner_mut(&mut self) -> &mut Command {
+ fn inner_mut(&mut self) -> &mut CommandBase {
&mut self.inner
}
@@ -145,3 +146,5 @@ impl BaseCommand for SuggestsCommand {
&mut self.io
}
}
+
+impl Command for SuggestsCommand {}