mir-plugin 0.61.0

Plugin API and registry for the mir PHP static analyzer
Documentation

Plugin API for the mir PHP static analyzer, modeled on Psalm's plugin event handlers (https://psalm.dev/docs/running_psalm/plugins/plugins_overview/).

A plugin implements [MirPlugin], declares which hooks it wants via [MirPlugin::hooks], and is registered into a [PluginRegistry] that the host process installs globally with [install]. The analyzer snapshots the registry once per analysis pass; when no registry is installed every hook site reduces to a single Option check.

Plugins come in two flavors:

  • Rust plugins — compiled in (registered directly) or loaded from a cdylib at runtime (dylib feature, see [dylib]).
  • Psalm PHP plugins — reused through a PHP host subprocess (psalm-bridge feature, see [psalm]).