diff options
Diffstat (limited to 'crates/shirabe/src/plugin/command_event.rs')
| -rw-r--r-- | crates/shirabe/src/plugin/command_event.rs | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/crates/shirabe/src/plugin/command_event.rs b/crates/shirabe/src/plugin/command_event.rs index 715f29a..f2a8417 100644 --- a/crates/shirabe/src/plugin/command_event.rs +++ b/crates/shirabe/src/plugin/command_event.rs @@ -2,8 +2,8 @@ use crate::event_dispatcher::event::Event; use indexmap::IndexMap; -use shirabe_external_packages::symfony::console::input::input_interface::InputInterface; -use shirabe_external_packages::symfony::console::output::output_interface::OutputInterface; +use shirabe_external_packages::symfony::component::console::input::input_interface::InputInterface; +use shirabe_external_packages::symfony::component::console::output::output_interface::OutputInterface; use shirabe_php_shim::PhpMixed; #[derive(Debug)] @@ -16,17 +16,26 @@ impl CommandEvent { // TODO(phase-b): input/output dropped because storing &dyn references in an event would // require lifetime parameters; restore once Plugin API needs them. pub fn new( - name: String, - command_name: String, + name: &str, + command_name: &str, + _input: &dyn InputInterface, + _output: &dyn OutputInterface, + ) -> Self { + Self::new6(name, command_name, _input, _output, vec![], IndexMap::new()) + } + + pub fn new6( + name: &str, + command_name: &str, _input: &dyn InputInterface, _output: &dyn OutputInterface, args: Vec<String>, flags: IndexMap<String, PhpMixed>, ) -> Self { - let inner = Event::new(name, args, flags); + let inner = Event::new(name.to_string(), args, flags); Self { inner, - command_name, + command_name: command_name.to_string(), } } |
