diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-07-04 20:40:31 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-07-04 20:40:31 +0900 |
| commit | bc17a09fc84d146b7d91401a2998ceef10c8a2ec (patch) | |
| tree | ac6e46161f2ac3763295ec13ba917ab06109c9c5 /crates | |
| parent | 8f852537e82dabd71b4492bdf903b95d9028560c (diff) | |
| download | php-shirabe-bc17a09fc84d146b7d91401a2998ceef10c8a2ec.tar.gz php-shirabe-bc17a09fc84d146b7d91401a2998ceef10c8a2ec.tar.zst php-shirabe-bc17a09fc84d146b7d91401a2998ceef10c8a2ec.zip | |
feat(plugin-installer): implement PluginInstaller::get_plugin_manager
Wires PartialComposer.as_full() to fetch the PluginManager, replacing
the todo!() stub. Mirrors PHP's assertion that $this->composer must be
a fully-loaded Composer instance.
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/shirabe/src/installer/plugin_installer.rs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/crates/shirabe/src/installer/plugin_installer.rs b/crates/shirabe/src/installer/plugin_installer.rs index 132d408..7ff5eb3 100644 --- a/crates/shirabe/src/installer/plugin_installer.rs +++ b/crates/shirabe/src/installer/plugin_installer.rs @@ -58,8 +58,16 @@ impl PluginInstaller { } fn get_plugin_manager(&self) -> std::rc::Rc<std::cell::RefCell<PluginManager>> { - // TODO(plugin): PartialComposer does not expose PluginManager; revisit when wiring plugin support - todo!("PartialComposer.get_plugin_manager") + // PHP asserts that $this->composer is instance of fully-loaded Composer, and throws a + // LogicException if not. In Rust, just panic!. + self.inner + .composer + .upgrade() + .expect("Composer handle dropped") + .as_full() + .expect("PluginInstaller should be initialized with a fully loaded Composer instance.") + .borrow() + .get_plugin_manager() } } |
