diff options
Diffstat (limited to 'crates/shirabe/src/plugin/capable.rs')
| -rw-r--r-- | crates/shirabe/src/plugin/capable.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/shirabe/src/plugin/capable.rs b/crates/shirabe/src/plugin/capable.rs index 830a7dab..3d3b8e3b 100644 --- a/crates/shirabe/src/plugin/capable.rs +++ b/crates/shirabe/src/plugin/capable.rs @@ -1,9 +1,12 @@ //! ref: composer/src/Composer/Plugin/Capable.php use indexmap::IndexMap; +use shirabe_php_shim::PhpMixed; // The sole implementor is the PHP plugin proxy (Composer itself never implements Capable), so -// the trait is fallible: the answer crosses the RPC boundary. +// the trait is fallible: the answer crosses the RPC boundary. Values are PhpMixed, not String: +// PHP's getCapabilities() may return anything, and PluginManager validates only the queried +// key, so narrowing the type here would reject maps upstream Composer accepts. pub trait Capable { - fn get_capabilities(&self) -> anyhow::Result<IndexMap<String, String>>; + fn get_capabilities(&self) -> anyhow::Result<IndexMap<String, PhpMixed>>; } |
