Skip to content
github-actions edited this page Apr 1, 2026 · 6 revisions

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

Methods

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 Value:

the capability mapping configurations


getSubscribedEvents

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


runSyncCommand

Handles the automated script installation.

public runSyncCommand(\Composer\Script\Event $event): void

This method MUST execute the dev-tools:sync command after relevant Composer operations to ensure the development tools are correctly synchronized with the current project state.

Parameters:

Parameter Type Description
$event \Composer\Script\Event the Composer script event context

activate

Handles activation lifecycle events for the Composer session.

public activate(\Composer\Composer $composer, \Composer\IO\IOInterface $io): void

This method MUST adhere to the standard Composer plugin activation protocol, even if no specific logic is required.

Parameters:

Parameter Type Description
$composer \Composer\Composer the primary package configuration instance over Composer
$io \Composer\IO\IOInterface interactive communication channels

deactivate

Cleans up operations during Composer plugin deactivation events.

public deactivate(\Composer\Composer $composer, \Composer\IO\IOInterface $io): void

This 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

uninstall

Handles final uninstallation processes logically.

public uninstall(\Composer\Composer $composer, \Composer\IO\IOInterface $io): void

This 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

Clone this wiki locally