From 78c23c7105914b74ae91c71496265d3b03d7e285 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 9 Aug 2026 19:10:27 +0900 Subject: feat(plugin): let a Rust-implemented plugin cross into the worker PluginManager::getPluginCapability hands the plugin itself to the capability constructor. Only a PHP-implemented plugin had an entity the child could receive, so a Rust-implemented one bailed out; it now crosses as a handle to an R-table entity behind Shirabe\RustPluginStub, or its Capable flavour, since `$plugin instanceof Capable` is what decides whether Composer asks a plugin for capabilities at all. This is what the two capability tests of PluginInstallerTest were waiting on: the mocked Capable plugin is Rust-side, and one of them asserts the identity of the plugin read back out of $capability->args. --- crates/shirabe-php-rpc/src/lib.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'crates/shirabe-php-rpc/src/lib.rs') diff --git a/crates/shirabe-php-rpc/src/lib.rs b/crates/shirabe-php-rpc/src/lib.rs index 6dfdebf5..a4742664 100644 --- a/crates/shirabe-php-rpc/src/lib.rs +++ b/crates/shirabe-php-rpc/src/lib.rs @@ -969,6 +969,14 @@ const RUNTIME_FILES: &[(&str, &str)] = &[ "Shirabe/RustCommandStub.php", include_str!("../php/runtime/Shirabe/RustCommandStub.php"), ), + ( + "Shirabe/RustPluginStub.php", + include_str!("../php/runtime/Shirabe/RustPluginStub.php"), + ), + ( + "Shirabe/RustCapablePluginStub.php", + include_str!("../php/runtime/Shirabe/RustCapablePluginStub.php"), + ), ]; struct Worker { -- cgit v1.3.1-4-g156e