Plugin
in package
implements
Capable, PluginInterface
Implements the lifecycle of the Composer dev-tools extension framework.
This plugin class MUST initialize and coordinate custom script registrations securely.
Table of Contents
Interfaces
- Capable
- PluginInterface
Methods
- activate() : void
- Handles activation lifecycle events for the Composer session.
- deactivate() : void
- Cleans up operations during Composer plugin deactivation events.
- getCapabilities() : array<string, string>
- Resolves the implemented Composer capabilities structure.
- uninstall() : void
- Handles final uninstallation processes logically.
Methods
activate()
Handles activation lifecycle events for the Composer session.
public
activate(Composer $composer, IOInterface $io) : void
The method MUST ensure the dev-tools script capability exists inside composer.json extras.
It SHOULD append it if currently missing.
Parameters
- $composer : Composer
-
the primary package configuration instance over Composer
- $io : IOInterface
-
interactive communication channels
deactivate()
Cleans up operations during Composer plugin deactivation events.
public
deactivate(Composer $composer, IOInterface $io) : void
This method MUST implement the standard Composer lifecycle correctly, even if vacant.
Parameters
- $composer : Composer
-
the primary metadata controller object
- $io : IOInterface
-
defined interactions proxy
getCapabilities()
Resolves the implemented Composer capabilities structure.
public
getCapabilities() : array<string, string>
This method MUST map the primary capability handlers to custom implementations. It SHALL describe how tools seamlessly integrate into the execution layer.
Return values
array<string, string> —the capability mapping configurations
uninstall()
Handles final uninstallation processes logically.
public
uninstall(Composer $composer, IOInterface $io) : void
This method MUST manage cleanup duties per Composer constraints, even if empty.
Parameters
- $composer : Composer
-
system package registry utility
- $io : IOInterface
-
execution runtime outputs and inputs proxy interface