PHP Class cweagans\Composer\Patches

Inheritance: implements Composer\Plugin\PluginInterface, implements Composer\EventDispatcher\EventSubscriberInterface
Afficher le fichier Open project: cweagans/composer-patches

Protected Properties

Свойство Type Description
$composer Composer\Composer
$eventDispatcher EventDispatcher
$executor Composer\Util\ProcessExecutor
$io Composer\IO\IOInterface
$patches array

Méthodes publiques

Méthode Description
activate ( Composer\Composer $composer, Composer\IO\IOInterface $io ) Apply plugin modifications to composer
checkPatches ( Composer\Script\Event $event ) Before running composer install,
gatherPatches ( Composer\Installer\PackageEvent $event ) Gather patches from dependencies and store them for later use.
getSubscribedEvents ( ) Returns an array of event names this subscriber wants to listen to.
grabPatches ( ) : Patches Get the patches from root composer or external file
postInstall ( Composer\Installer\PackageEvent $event )

Méthodes protégées

Méthode Description
executeCommand ( string $cmd ) : boolean Executes a shell command with escaping.
getAndApplyPatch ( Composer\Util\RemoteFilesystem $downloader, $install_path, $patch_url ) Apply a patch on code in the specified directory.
getPackageFromOperation ( Composer\DependencyResolver\Operation\OperationInterface $operation ) : Composer\Package\PackageInterface Get a Package object from an OperationInterface object.
isPatchingEnabled ( ) : boolean Checks if the root package enables patching.
writePatchReport ( array $patches, string $directory ) Writes a patch report to the target directory.

Method Details

activate() public méthode

Apply plugin modifications to composer
public activate ( Composer\Composer $composer, Composer\IO\IOInterface $io )
$composer Composer\Composer
$io Composer\IO\IOInterface

checkPatches() public méthode

Before running composer install,
public checkPatches ( Composer\Script\Event $event )
$event Composer\Script\Event

executeCommand() protected méthode

Executes a shell command with escaping.
protected executeCommand ( string $cmd ) : boolean
$cmd string
Résultat boolean

gatherPatches() public méthode

Gather patches from dependencies and store them for later use.
public gatherPatches ( Composer\Installer\PackageEvent $event )
$event Composer\Installer\PackageEvent

getAndApplyPatch() protected méthode

Apply a patch on code in the specified directory.
protected getAndApplyPatch ( Composer\Util\RemoteFilesystem $downloader, $install_path, $patch_url )
$downloader Composer\Util\RemoteFilesystem
$install_path
$patch_url

getPackageFromOperation() protected méthode

Get a Package object from an OperationInterface object.
protected getPackageFromOperation ( Composer\DependencyResolver\Operation\OperationInterface $operation ) : Composer\Package\PackageInterface
$operation Composer\DependencyResolver\Operation\OperationInterface
Résultat Composer\Package\PackageInterface

getSubscribedEvents() public static méthode

Returns an array of event names this subscriber wants to listen to.
public static getSubscribedEvents ( )

grabPatches() public méthode

Get the patches from root composer or external file
public grabPatches ( ) : Patches
Résultat Patches

isPatchingEnabled() protected méthode

Checks if the root package enables patching.
protected isPatchingEnabled ( ) : boolean
Résultat boolean Whether patching is enabled. Defaults to TRUE.

postInstall() public méthode

public postInstall ( Composer\Installer\PackageEvent $event )
$event Composer\Installer\PackageEvent

writePatchReport() protected méthode

Writes a patch report to the target directory.
protected writePatchReport ( array $patches, string $directory )
$patches array
$directory string

Property Details

$composer protected_oe property

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

$eventDispatcher protected_oe property

protected EventDispatcher $eventDispatcher
Résultat EventDispatcher

$executor protected_oe property

protected ProcessExecutor,Composer\Util $executor
Résultat Composer\Util\ProcessExecutor

$io protected_oe property

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

$patches protected_oe property

protected array $patches
Résultat array