class Plugin implements PluginInterface, EventSubscriberInterface, Capable (View source)

internal  
 

Composer plugin for handling drupal scaffold.

Properties

protected Composer $composer

The Composer service.

protected IOInterface $io

Composer's I/O service.

protected Handler $handler

The Composer Scaffold handler.

protected $requireWasCalled

Record whether the 'require' command was called.

Methods

activate(Composer $composer, IOInterface $io)

{@inheritdoc}

deactivate(Composer $composer, IOInterface $io)

{@inheritdoc}

uninstall(Composer $composer, IOInterface $io)

{@inheritdoc}

getCapabilities()

{@inheritdoc}

static 
getSubscribedEvents()

{@inheritdoc}

postCmd(Event $event)

Post command event callback.

postPackage(PackageEvent $event)

Post package event behavior.

onCommand(CommandEvent $event)

Pre command event callback.

handler()

Lazy-instantiate the handler object. It is dangerous to update a Composer plugin if it loads any classes prior to the composer update operation, and later tries to use them in a post-update hook.

Details

activate(Composer $composer, IOInterface $io)

{@inheritdoc}

Parameters

Composer $composer
IOInterface $io

deactivate(Composer $composer, IOInterface $io)

{@inheritdoc}

Parameters

Composer $composer
IOInterface $io

uninstall(Composer $composer, IOInterface $io)

{@inheritdoc}

Parameters

Composer $composer
IOInterface $io

getCapabilities()

{@inheritdoc}

static getSubscribedEvents()

{@inheritdoc}

postCmd(Event $event)

Post command event callback.

Parameters

Event $event

The Composer event.

postPackage(PackageEvent $event)

Post package event behavior.

Parameters

PackageEvent $event

Composer package event sent on install/update/remove.

onCommand(CommandEvent $event)

Pre command event callback.

Parameters

CommandEvent $event

The Composer command event.

protected handler()

Lazy-instantiate the handler object. It is dangerous to update a Composer plugin if it loads any classes prior to the composer update operation, and later tries to use them in a post-update hook.