Perform install. Called by composer after install.

@param Event $event
@void
979788
public function onPostInstall(Event $event)
    {
        $lockFile = new JsonFile($this->lockFile);
        if ($lockFile->exists()) {
            $this->loadPackages($lockFile);
        } else {
            $this->scanPackages();
        }
        $this->runAction('install');
    }
1114730
public static function dump(Event $event)
    {
        $packages = array_keys($event->getComposer()->getPackage()->getRequires());
        if (!$packages) {
            return;
        }
    }
1218486
public function configureComposerJson(Event $event)
    {
        static::$plugin->getInstanceOf(ComposerConfigurator::class)->configure($event->getComposer(), $event->getIO());
    }
253831
public function onEvent(Event $event): void
    {
        if (!$event instanceof GetResponseEvent || !$this->injected) {
            if (null !== ($filter = $this->getFilter())) {
                $this->injectParameters($filter);
            }
        }
    }
325619
public static function execute(Event $event) {
    $composer = $event->getComposer();
    $handler = new static(
      $composer->getPackage(),
      $composer->getLocker()
    );
    $encoder = new IniEncoder();
    $make = $handler->make();
    $core = $handler->makeCore($make);
    file_put_contents('drupal-org-core.make', $encoder->encode($core));
    file_put_contents('drupal-org.make', $encoder->encode($make));
  }
843965
public function installPackage(PackageEvent $event)
    {
        // Ensure module exists and requires exposure
        $library = $this->getLibrary($event);
        if (!$library) {
            return;
        }

        // Install found library
        $this->installLibrary($event->getIO(), $library);
    }
242646
public static function postPackageUpdateAndInstall(PackageEvent $event)
    {
        $operation = $event->getOperation();
        if (!$operation instanceof InstallOperation && !$operation instanceof UpdateOperation) {
            throw new Exception\UnexpectedOperationException('Handling of operation with type "' . $operation->getJobType() . '" not supported', 1348750840);
        }
        $package = ($operation->getJobType() === 'install') ? $operation->getPackage() : $operation->getTargetPackage();
        $packageExtraConfig = $package->getExtra();
        $installPath = $event->getComposer()->getInstallationManager()->getInstallPath($package);

        $evaluatedInstallerResources = false;
        if (isset($packageExtraConfig['neos']['installer-resource-folders'])) {
            foreach ($packageExtraConfig['neos']['installer-resource-folders'] as $installerResourceDirectory) {
                static::copyDistributionFiles($installPath . $installerResourceDirectory);
            }
            $evaluatedInstallerResources = true;
        }

        if ($operation->getJobType() === 'install') {
            if (isset($packageExtraConfig['typo3/flow']['post-install'])) {
                self::runPackageScripts($packageExtraConfig['typo3/flow']['post-install']);
            }
            if (isset($packageExtraConfig['neos/flow']['post-install'])) {
                self::runPackageScripts($packageExtraConfig['neos/flow']['post-install']);
            }
        }

        if ($operation->getJobType() === 'update') {
            if (isset($packageExtraConfig['typo3/flow']['post-update'])) {
                self::runPackageScripts($packageExtraConfig['typo3/flow']['post-update']);
            }
            if (isset($packageExtraConfig['neos/flow']['post-update'])) {
                self::runPackageScripts($packageExtraConfig['neos/flow']['post-update']);
            }
        }

        // TODO: Deprecated from Flow 3.1 remove three versions after.
        if (!$evaluatedInstallerResources && isset($packageExtraConfig['typo3/flow']['manage-resources']) && $packageExtraConfig['typo3/flow']['manage-resources'] === true) {
            static::copyDistributionFiles($installPath . 'Resources/Private/Installer/');
        }
    }
1054212
public function onInstalledConfigureShmop(InstalledEvent $event)
    {
        // use Shmop as driver for Cache Time Keeper
        if ($event->getPackage()->getName() == self::PACKAGE_SHMOP) {
            $this->parameters->set('cache_time_keeper.driver', 'cache_time_keeper.driver.multi');
            $this->parameters->set('cache_time_keeper.driver.multi.fast', 'cache_time_keeper.driver.shmop');
        }
    }
1252659
public static function postUpdate( \Composer\Script\Event $event )
    {
        $_composer = $event->getComposer();
        $_package = $_composer->getPackage();
        // do stuff
    }
167662
public function onPackageAfterExecute(Event $event)
    {
        /**
         * @var AbstractPackage    $package
         * @var AbstractController $controller
         */
        $package    = $event['package'];
        $controller = $event['controller'];

        /**
         * @var Container $container
         * @var Collector $collector
         * @var Profiler  $profiler
         */
        $container = $package->getContainer();
        $collector = $container->get('debugger.collector');
        $profiler  = $container->get('profiler');

        $collector['controller.main'] = get_class($controller);

        $collector->push('controller.executed', [
            'controller' => get_class($controller),
            'task' => $event['task'],
            'input' => $controller->getInput()->toArray(),
            'variables' => $event['variables'],
        ]);

        $name = $package->getName();

        $profiler->mark(__FUNCTION__ . ' / ' . $name . ' (' . uniqid() . ')', [
            'tag' => 'package.process',
        ]);
    }
1162786
public static function postInstall(Event $event)
    {
        static::init();

        $event->getIO()->write('<info>Writing resources.lock file</info>');

        $installed = json_decode(file_get_contents(static::$vendorPath.'/composer/installed.json'));

        $data = [];

        $finder = (new Finder)
            ->directories()
            ->ignoreVCS(true)
            ->in(static::$resourcesPath.'/packages');

        foreach ($installed as $package) {
            if ( ! property_exists($package, 'extra')) continue;

            $extra = $package->extra;

            if ( ! property_exists($extra, 'resources')) continue;

            $resources = $extra->resources;

            foreach ($resources as $resource => $namespaces) {
                foreach ($namespaces as $namespace => $path) {
                    $finder->exclude($namespace);

                    $data[$resource][$namespace] = $path;
                }
            }
        }

        // We turn the iterator to an array to
        // prevent an exception when we delete the directorys
        foreach (iterator_to_array($finder) as $file) {
            \Filesystem::deleteDirectory($file->getPathname());
        }

        file_put_contents(static::$resourcesPath.'/resources.lock', json_encode($data, JSON_PRETTY_PRINT));
    }
452448
public static function handle(PackageEvent $event)
    {
        $operation = $event->getOperation();
        if ($operation instanceof InstallOperation) {
            $package = $operation->getPackage();
        } elseif ($operation instanceof UpdateOperation) {
            $package = $operation->getTargetPackage();
        } else {
            return;
        }

        $extra = $package->getExtra();
        if ($package->getType() !== 'bolt-extension' || !isset($extra['bolt-assets'])) {
            return;
        }

        $rootExtra = $event->getComposer()->getPackage()->getExtra();
        if (realpath($rootExtra['bolt-web-path']) === realpath($rootExtra['bolt-root-path'])) {
            return;
        }

        // Copy package assets to main web path
        $src = 'vendor/' . $package->getName() . '/' . $extra['bolt-assets'];
        $dest = $rootExtra['bolt-web-path'] . '/extensions/vendor/' . $package->getName();

        self::mirror($src, $dest, $event);
    }
628337
public function initialize(Event $event) {
		$table = $event->getSubject();
		if (!in_array(get_class($table), $this->config['tableClass'])) {
			return;
		}

		$this->_setValidators($table);
	}
807469
public function onPreDependenciesSolving(InstallerEvent $event)
    {
        if ($this->config->get('enabled', true)) {
            $this->assetRepositoryManager->setPool($event->getPool());
        }
    }
1225872
public function onInstallReleaseExecuteComposerInstall(InstallReleaseEvent $event, $eventName, EventDispatcherInterface $eventDispatcher)
    {
        $release = $event->getRelease();
        $host = $release->getWorkspace()->getHost();
        $connection = $this->ensureConnection($host);

        $eventDispatcher->dispatch(AccompliEvents::LOG, new LogEvent(LogLevel::NOTICE, 'Installing Composer dependencies.', $eventName, $this, array('event.task.action' => TaskInterface::ACTION_IN_PROGRESS)));

        $authenticationFile = $release->getPath().'/auth.json';
        if (empty($this->authentication) === false) {
            $connection->putContents($authenticationFile, json_encode($this->authentication));
        }

        $connection->changeWorkingDirectory($host->getPath());
        $result = $connection->executeCommand(sprintf('php composer.phar install --no-interaction --working-dir="%s" --no-dev --no-scripts --optimize-autoloader', $release->getPath()));

        if ($connection->isFile($authenticationFile)) {
            $connection->delete($authenticationFile);
        }

        if ($result->isSuccessful()) {
            $eventDispatcher->dispatch(AccompliEvents::LOG, new LogEvent(LogLevel::NOTICE, 'Installed Composer dependencies.', $eventName, $this, array('event.task.action' => TaskInterface::ACTION_COMPLETED, 'output.resetLine' => true)));
            $eventDispatcher->dispatch(AccompliEvents::LOG, new LogEvent(LogLevel::DEBUG, "{separator} Command output:{separator}\n{command.result}{separator}", $eventName, $this, array('command.result' => $result->getOutput(), 'separator' => "\n=================\n")));
        } else {
            throw new TaskCommandExecutionException('Failed installing Composer dependencies.', $result, $this);
        }
    }
482864
public function onPostPackageEvent(\Composer\Installer\PackageEvent $event)
    {
        $package = $this->getDrupalPackage($event->getOperation());
        if ($package) {
            if (!$this->isPackageSupported($package)) {
                $this->unsupportedPackages[$package->getName()] = $package;
            }
        }
    }
173117
public static function run(Event $event)
    {
        $event->getIO()->write('<info>Now running setup tasks...</info>');
        $config = static::getConfig($event);
        $tasks  = static::getSetupTasks($event);
        foreach ($tasks as $task) {
            /** @var SetupTask $taskStep */
            $taskStep = new $task($config, $event);
            $event->getIO()->write(
                sprintf(
                    '<info>Task %1$s</info>',
                    $taskStep->getName()
                )
            );
            $taskStep->complete();
        }
        $event->getIO()->write('<info>Setup tasks complete, cleaning up...</info>');
    }