-
Notifications
You must be signed in to change notification settings - Fork 0
Plugin
Implements the lifecycle of the Composer dev-tools extension framework.
This plugin class MUST initialize and coordinate custom script registrations securely.
- Full name:
\FastForward\DevTools\Composer\Plugin - This class is marked as final and can't be subclassed
- This class implements:
Capable,EventSubscriberInterface,PluginInterface - This class is a Final class
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 Value:
the capability mapping configurations
Retrieves the comprehensive map of events this listener SHALL handle.
public static getSubscribedEvents(): array<string,string>This method MUST define the lifecycle triggers for script installation and synchronization during Composer package operations.
- This method is static. Return Value:
the event mapping registry
Handles the automated script installation.
public onPostInstall(\Composer\Script\Event $event): voidThis method MUST be triggered by POST_INSTALL_CMD and SHALL delegate
the actual work to the installScripts utility.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$event |
\Composer\Script\Event | the Composer script event context |
Handles the automated script synchronization after updates.
public onPostUpdate(\Composer\Script\Event $event): voidThis method MUST be triggered by POST_UPDATE_CMD and SHALL ensure
that all development scripts are correctly aligned in the root configuration.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$event |
\Composer\Script\Event | the Composer script event context |
Handles activation lifecycle events for the Composer session.
public activate(\Composer\Composer $composer, \Composer\IO\IOInterface $io): voidThe method MUST ensure the dev-tools script capability exists inside composer.json extras.
It SHOULD append it if currently missing.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$composer |
\Composer\Composer | the primary package configuration instance over Composer |
$io |
\Composer\IO\IOInterface | interactive communication channels |
Cleans up operations during Composer plugin deactivation events.
public deactivate(\Composer\Composer $composer, \Composer\IO\IOInterface $io): voidThis method MUST implement the standard Composer lifecycle correctly, even if vacant.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$composer |
\Composer\Composer | the primary metadata controller object |
$io |
\Composer\IO\IOInterface | defined interactions proxy |
Handles final uninstallation processes logically.
public uninstall(\Composer\Composer $composer, \Composer\IO\IOInterface $io): voidThis method MUST manage cleanup duties per Composer constraints, even if empty.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$composer |
\Composer\Composer | system package registry utility |
$io |
\Composer\IO\IOInterface | execution runtime outputs and inputs proxy interface |