PHP Class GrumPHP\Composer\GrumPHPPlugin

Inheritance: implements Composer\Plugin\PluginInterface, implements Composer\EventDispatcher\EventSubscriberInterface
Afficher le fichier Open project: phpro/grumphp

Protected Properties

Свойство Type Description
$composer Composer\Composer
$configureScheduled boolean
$initScheduled boolean
$io Composer\IO\IOInterface

Méthodes publiques

Méthode Description
activate ( Composer\Composer $composer, Composer\IO\IOInterface $io )
getSubscribedEvents ( ) Attach package installation events:
postPackageInstall ( Composer\Installer\PackageEvent $event ) When this package is updated, the git hook is also initialized
postPackageUpdate ( Composer\Installer\PackageEvent $event ) When this package is updated, the git hook is also updated
prePackageUninstall ( Composer\Installer\PackageEvent $event ) When this package is uninstalled, the generated git hooks need to be removed
runScheduledTasks ( Composer\Script\Event $event )

Méthodes protégées

Méthode Description
deInitGitHook ( ) Deinitialize git hooks
guardIsGrumPhpPackage ( Composer\Package\PackageInterface $package ) : boolean
initGitHook ( ) Initialize git hooks
runGrumPhpCommand ( $command ) Run the GrumPHP console to (de)init the git hooks

Method Details

activate() public méthode

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

deInitGitHook() protected méthode

Deinitialize git hooks
protected deInitGitHook ( )

getSubscribedEvents() public static méthode

public static getSubscribedEvents ( )

guardIsGrumPhpPackage() protected méthode

protected guardIsGrumPhpPackage ( Composer\Package\PackageInterface $package ) : boolean
$package Composer\Package\PackageInterface
Résultat boolean

initGitHook() protected méthode

Initialize git hooks
protected initGitHook ( )

postPackageInstall() public méthode

When this package is updated, the git hook is also initialized
public postPackageInstall ( Composer\Installer\PackageEvent $event )
$event Composer\Installer\PackageEvent

postPackageUpdate() public méthode

When this package is updated, the git hook is also updated
public postPackageUpdate ( Composer\Installer\PackageEvent $event )
$event Composer\Installer\PackageEvent

prePackageUninstall() public méthode

When this package is uninstalled, the generated git hooks need to be removed
public prePackageUninstall ( Composer\Installer\PackageEvent $event )
$event Composer\Installer\PackageEvent

runGrumPhpCommand() protected méthode

Run the GrumPHP console to (de)init the git hooks
protected runGrumPhpCommand ( $command )
$command

runScheduledTasks() public méthode

public runScheduledTasks ( Composer\Script\Event $event )
$event Composer\Script\Event

Property Details

$composer protected_oe property

protected Composer,Composer $composer
Résultat Composer\Composer

$configureScheduled protected_oe property

protected bool $configureScheduled
Résultat boolean

$initScheduled protected_oe property

protected bool $initScheduled
Résultat boolean

$io protected_oe property

protected IOInterface,Composer\IO $io
Résultat Composer\IO\IOInterface