Hook which is called after install package
It copies bluz module

@param PackageEvent $event

@throws \InvalidArgumentException
506157
public function copyModuleFiles(PackageEvent $event): void
    {
        $package = $this->extractPackage($event);
        $this->packagePath = $this->vendorPath .DS. $package->getName();
        if ($package->getType() === 'bluz-module' && file_exists($this->packagePath)) {
            if ($package->getExtra() && isset($package->getExtra()['copy-files'])) {
                $this->copyExtras($package->getExtra()['copy-files']);
            }
            $this->copyModule();
        }
    }
1197258
protected function _triggerBeforeEvents(PluginPackage $plugin)
    {
        $affix = ucwords($this->params['status']);
        try {
            $event = $this->trigger("Plugin.{$plugin->name}.before{$affix}");
            if ($event->isStopped() || $event->result === false) {
                $this->err(__d('installer', 'Task was explicitly rejected by the plugin.'));

                return false;
            }
        } catch (\Exception $e) {
            $this->err(__d('installer', 'Internal error, plugin did not respond to "before{0}" callback properly.', $affix));

            return false;
        }

        return true;
    }
22179
public function onPostPackageEvent(PackageEvent $event) {
    // Get the effected package from the Event.
    $installed_package = NULL;
    $operation = $event->getOperation();
    if ($operation instanceof UpdateOperation) {
      $installed_package = $operation->getTargetPackage();
    }
    else {
      $installed_package = $operation->getPackage();
    }
    $package_extra = $installed_package->getExtra();

    // If the effected package has installers, reset cached installers.
    if (isset($package_extra) && isset($package_extra['installer-paths'])) {
      $composer = $event->getComposer();
      $composer->getInstallationManager()->removeInstaller($this->installer);
      $composer->getInstallationManager()->addInstaller($this->installer);
      $this->installer->clearCache();
    }
  }
60135
public function onPrePackage(PackageEvent $event)
    {
        if ($event->getIO() instanceof BufferIO) {
            $this->logger->debug($event->getIO()->getOutput(), ['event' => 'extensions']);
        }
    }
645376
public function onCommandBeforePrepare(Event $event) {
        /** @var Command $command */
        $command = $event['command'];
        if (in_array($command->getName(), $this->commands)) {
            // Get the interesting parameters
            $source = $command->get($this->sourceParameter);
            $body = $command->get($this->bodyParameter);

            // If a file path is passed in then get the file handle
            if (is_string($source) && file_exists($source)) {
                $body = fopen($source, 'rb');
            }

            // Prepare the body parameter and remove the source file parameter
            if (null !== $body) {
                $command->remove($this->sourceParameter);
                $command->set($this->bodyParameter, EntityBody::factory($body));
            } else {
                throw new InvalidArgumentException(
                        "You must specify a non-null value for the {$this->bodyParameter} or {$this->sourceParameter} parameters.");
            }
        }
    }
517647
public function handle(Event $event)
    {
        // Define Event:
        
        $this->setEvent($event);
        
        // Check Event Name:
        
        if (!$this->hasHandler($event->getName())) {
            
            throw new InvalidArgumentException(
                sprintf(
                    'An event handler does not exist for "%s"',
                    $event->getName()
                )
            );
            
        }
        
        // Handle Event:
        
        $this->{$this->handlers[$event->getName()]}();
    }
1098586
public function onPostInstallCmd(Event $event)
    {
        $this->bridgeFactory->createBridge($event->getIO())
            ->install($event->getComposer(), $event->isDevMode());
    }
292851
public static function packageInKernel(PackageEvent $event)
    {
        self::addJobByOperationType(
            $event->getOperation(),
            function ($package) {
                return new AddKernel($package);
            },
            function ($package) {
                return new RemoveKernel($package);
            }
        );
    }
68357
public static function prePackageUninstall(PackageEvent $event){
		$installedPackage = $event->getOperation()->getPackage()->getName();
		if (self::checkConfig($event, $installedPackage)) {
			self::phinxRollbackFromPackageName($event, $installedPackage);
		} else {
			die();
		}
	}
1252659
public static function postUpdate( \Composer\Script\Event $event )
    {
        $_composer = $event->getComposer();
        $_package = $_composer->getPackage();
        // do stuff
    }
1108175
public function uninstallWordPressPlugin(PackageEvent $event)
    {
        if (! $this->isWordPressPlugin($this->getPackage($event))) {
            return;
        }
        
        static::$plugin->getInstanceOf(PluginInteractor::class)->uninstall(
            $event->getComposer(),
            $event->getIO(),
            preg_replace('/^wpackagist-plugin\//', '', $this->getPackageName($event))
        );
    }
510188
public static function postAutoloadDump(Event $event)
    {
        $composer = $event->getComposer();
        $config = $composer->getConfig();

        $vendorDir = realpath($config->get('vendor-dir'));

        $packages = $composer->getRepositoryManager()->getLocalRepository()->getPackages();
        $pluginsDir = dirname($vendorDir) . DIRECTORY_SEPARATOR . 'plugins';

        $plugins = static::determinePlugins($packages, $pluginsDir, $vendorDir);

        $configFile = static::configFile($vendorDir);
        static::writeConfigFile($configFile, $plugins);
    }
34460
public static function postInstall(Event $event)
    {
        require_once $event->getComposer()->getConfig()->get('vendor-dir').'/autoload.php';

        static::clearCompiled();
        static::artisanOptimize();
        static::artisanLangJS();
    }
361075
public function installPackage(PackageEvent $event)
    {
        $package = $this->getOperationPackage($event);
        if ($package) {
            $installer = new RecipeInstaller($event->getIO(), $event->getComposer());
            $installer->installLibrary($package);
        }
    }
504917
public static function execute(Event $event) {
    $root_package = $event->getComposer()->getPackage();
    $patched_dependencies = static::getPatchedDependencyConstraints($root_package);
    $error = [];

    /** @var \Composer\Package\Link $package */
    foreach ($patched_dependencies as $package) {
      if (static::packageIsUnpinned($package)) {
        $error[] = $package->getTarget() . ': ' . $package->getPrettyConstraint();
      }
    }
    if (!empty($error)) {
      array_unshift($error, 'The following dependencies are patched but don\'t have pinned dependency constraints:');
      $event->getIO()->writeError($error);
      return FALSE;
    }
    else {
      $event->getIO()->write('Patched dependencies have constraints that are properly pinned.');
    }
  }
223648
public function checkPackageUpdates(PackageEvent $event)
    {
        $operation = $event->getOperation();
        if ($operation instanceof UpdateOperation) {
            $this->_packageUpdates[$operation->getInitialPackage()->getName()] = [
                'from' => $operation->getInitialPackage()->getVersion(),
                'fromPretty' => $operation->getInitialPackage()->getPrettyVersion(),
                'to' => $operation->getTargetPackage()->getVersion(),
                'toPretty' => $operation->getTargetPackage()->getPrettyVersion(),
                'direction' => $event->getPolicy()->versionCompare(
                    $operation->getInitialPackage(),
                    $operation->getTargetPackage(),
                    '<'
                ) ? 'up' : 'down',
            ];
        }
    }
91370
public static function postPackageInstall(PackageEvent $event){
		$installedPackage = $event->getOperation()->getPackage()->getName();
		if (self::checkConfig($event, $installedPackage)) {
			self::phinxMigrateFromPackageName($event, $installedPackage, true);
		} else {
			die();
		}
	}