PluginInstallerInterface
Installs, updates, and removes plugins from remote sources (GitHub).
PluginInstallerInterface::require()
abstract public function require(string $source): Milpa\app\DTO\PluginInstallResultInstall a plugin from a remote source (GitHub).
Parameters
| Nombre | Tipo | Descripción |
|---|---|---|
| $source | string | "owner/repo", "owner/repo:^2.0", or full GitHub URL |
Throws
\Milpa\app\Exceptions\Plugin\PluginInstallException If the plugin fails to install.
\Milpa\app\Exceptions\Plugin\PluginDependencyException If a required dependency is unmet.
PluginInstallerInterface::update()
abstract public function update(string $pluginName, ?string $targetVersion = null): Milpa\app\DTO\PluginInstallResultUpdate an installed plugin to the latest compatible version.
Parameters
| Nombre | Tipo | Descripción |
|---|---|---|
| $pluginName | string | |
| $targetVersion | ?string |
Throws
\Milpa\app\Exceptions\Plugin\PluginInstallException If the plugin fails to update.
PluginInstallerInterface::resolve()
abstract public function resolve(string $source): Milpa\app\DTO\DependencyResolutionResolve plugin and Composer dependencies for a remote source without installing it. Downloads the candidate release, reads its manifest, and checks it against currently-installed plugins — the same resolution `require()` performs internally before it commits any files or DB state.
Parameters
| Nombre | Tipo | Descripción |
|---|---|---|
| $source | string | "owner/repo", "owner/repo:^2.0", or full GitHub URL |
PluginInstallerInterface::remove()
abstract public function remove(string $pluginName, bool $keepData = false): Milpa\app\DTO\PluginRemoveResultRemove a remotely-installed plugin.
Parameters
| Nombre | Tipo | Descripción |
|---|---|---|
| $pluginName | string | |
| $keepData | bool |