From bc17a09fc84d146b7d91401a2998ceef10c8a2ec Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 4 Jul 2026 20:40:31 +0900 Subject: 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. --- crates/shirabe/src/installer/plugin_installer.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'crates') 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> { - // 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() } } -- cgit v1.3.1