aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/event_dispatcher
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/event_dispatcher
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/event_dispatcher')
-rw-r--r--crates/shirabe/src/event_dispatcher/event_dispatcher.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/shirabe/src/event_dispatcher/event_dispatcher.rs b/crates/shirabe/src/event_dispatcher/event_dispatcher.rs
index db7860c..705287c 100644
--- a/crates/shirabe/src/event_dispatcher/event_dispatcher.rs
+++ b/crates/shirabe/src/event_dispatcher/event_dispatcher.rs
@@ -4,7 +4,7 @@ use indexmap::IndexMap;
use shirabe_external_packages::composer::pcre::preg::Preg;
use shirabe_external_packages::symfony::component::console::application::Application;
-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::input::string_input::StringInput;
use shirabe_external_packages::symfony::component::console::output::console_output::ConsoleOutput;
use shirabe_external_packages::symfony::component::process::executable_finder::ExecutableFinder;
@@ -595,7 +595,7 @@ impl EventDispatcher {
}
app.set_auto_exit(false);
// TODO(plugin): instantiate command class dynamically: `new $className($event->getName())`
- let cmd = Command::new(event.get_name().to_string());
+ let cmd = CommandBase::new(None); // TODO(plugin): pass event name
if method_exists(&PhpMixed::String("Application".to_string()), "addCommand")
{
app.add_command(cmd.clone());