function EventDispatcher::dispatchPackageEvent
Dispatch a package event.
Parameters
string $eventName The constant in PackageEvents:
bool $devMode Whether or not we are in dev mode:
RepositoryInterface $localRepo The installed repository:
OperationInterface[] $operations The list of operations:
OperationInterface $operation The package being installed/updated/removed:
Return value
int return code of the executed script if any, for php scripts a false return value is changed to 1, anything else to 0
File
-
vendor/
composer/ composer/ src/ Composer/ EventDispatcher/ EventDispatcher.php, line 146
Class
- EventDispatcher
- The Event Dispatcher.
Namespace
Composer\EventDispatcherCode
public function dispatchPackageEvent(string $eventName, bool $devMode, RepositoryInterface $localRepo, array $operations, OperationInterface $operation) : int {
assert($this->composer instanceof Composer, new \LogicException('This should only be reached with a fully loaded Composer'));
return $this->doDispatch(new PackageEvent($eventName, $this->composer, $this->io, $devMode, $localRepo, $operations, $operation));
}