blob: 3d3b8e3b62824cab7ad5faf1d1637b5091850efe (
plain)
1
2
3
4
5
6
7
8
9
10
11
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. 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, PhpMixed>>;
}
|