Plugin

Class
implements Capable EventSubscriberInterface PluginInterface
Final: Yes

Implements the lifecycle of the Composer dev-tools extension framework.

Description

This plugin class MUST initialize and coordinate custom script registrations securely.

Table of Contents

Interfaces

Methods

activate()

Handles activation lifecycle events for the Composer session.

 : void
deactivate()

Cleans up operations during Composer plugin deactivation events.

 : void
getCapabilities()

Resolves the implemented Composer capabilities structure.

 : array<string, string>
getSubscribedEvents()

Retrieves the comprehensive map of events this listener SHALL handle.

 : array<string, string>
runSyncCommand()

Handles the automated script installation.

 : void
uninstall()

Handles final uninstallation processes logically.

 : void
Methods

activate()

Public

Handles activation lifecycle events for the Composer session.

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

Description

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

Parameters
$composer : Composer

Description

the primary package configuration instance over Composer

$io : IOInterface

Description

interactive communication channels

deactivate()

Public

Cleans up operations during Composer plugin deactivation events.

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

Description

This method MUST implement the standard Composer lifecycle correctly, even if vacant.

Parameters
$composer : Composer

Description

the primary metadata controller object

$io : IOInterface

Description

defined interactions proxy

getCapabilities()

Public

Resolves the implemented Composer capabilities structure.

public getCapabilities() : array<string, string>

Description

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>

Description

the capability mapping configurations

getSubscribedEvents()

Public Static

Retrieves the comprehensive map of events this listener SHALL handle.

public static getSubscribedEvents() : array<string, string>

Description

This method MUST define the lifecycle triggers for script installation and synchronization during Composer package operations.

Return values
array<string, string>

Description

the event mapping registry

runSyncCommand()

Public

Handles the automated script installation.

public runSyncCommand(Event  $event) : void

Description

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
$event : Event

Description

the Composer script event context

uninstall()

Public

Handles final uninstallation processes logically.

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

Description

This method MUST manage cleanup duties per Composer constraints, even if empty.

Parameters
$composer : Composer

Description

system package registry utility

$io : IOInterface

Description

execution runtime outputs and inputs proxy interface