diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-19 00:10:22 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-19 00:11:03 +0900 |
| commit | c839244d8d09f3036ebfee8eef7eb6b147e593ab (patch) | |
| tree | fe48c94f2c2e62468beef5ff1a8f3cff6adeef4f /crates/shirabe/src/plugin/command_event.rs | |
| parent | 48839250146b217e2756ed3c0e624fd341b54d6c (diff) | |
| download | php-shirabe-c839244d8d09f3036ebfee8eef7eb6b147e593ab.tar.gz php-shirabe-c839244d8d09f3036ebfee8eef7eb6b147e593ab.tar.zst php-shirabe-c839244d8d09f3036ebfee8eef7eb6b147e593ab.zip | |
fix(compile): fix various compile errors
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/plugin/command_event.rs')
| -rw-r--r-- | crates/shirabe/src/plugin/command_event.rs | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/crates/shirabe/src/plugin/command_event.rs b/crates/shirabe/src/plugin/command_event.rs index aa5b366..715f29a 100644 --- a/crates/shirabe/src/plugin/command_event.rs +++ b/crates/shirabe/src/plugin/command_event.rs @@ -1,6 +1,7 @@ //! ref: composer/src/Composer/Plugin/CommandEvent.php 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_php_shim::PhpMixed; @@ -9,34 +10,28 @@ use shirabe_php_shim::PhpMixed; pub struct CommandEvent { inner: Event, command_name: String, - input: Box<dyn InputInterface>, - output: Box<dyn OutputInterface>, } 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, - input: Box<dyn InputInterface>, - output: Box<dyn OutputInterface>, - args: Vec<PhpMixed>, - flags: Vec<PhpMixed>, + _input: &dyn InputInterface, + _output: &dyn OutputInterface, + args: Vec<String>, + flags: IndexMap<String, PhpMixed>, ) -> Self { let inner = Event::new(name, args, flags); Self { inner, command_name, - input, - output, } } - pub fn get_input(&self) -> &dyn InputInterface { - self.input.as_ref() - } - - pub fn get_output(&self) -> &dyn OutputInterface { - self.output.as_ref() + pub fn get_name(&self) -> &str { + self.inner.get_name() } pub fn get_command_name(&self) -> &str { |
