Install dependencies in the theme root directory.

@param  Event $event
@return void
436376
public static function installDependencies( Event $event ) {
		if ( ! defined( 'WPEMERGE_CLI_DIR' ) ) {
			define( 'WPEMERGE_CLI_DIR', dirname( __DIR__ ) );
		}

		$input = new ArrayInput( [ 'install:dependencies' ] );
		$output = new ConsoleOutput();

		try {
			$application = static::create();
			$command = $application->find('install:dependencies');
			$command->run( $input, $output );
		} catch ( RuntimeException $e ) {
			$event->getIO()->write( '<error>' . $e->getMessage() . '</error>' );
		}
	}
908658
public function onPostCmdEvent(Event $event) {
    // Only install the template files if acquia/blt was installed.
    if (isset($this->bltPackage)) {
      $version = $this->bltPackage->getVersion();
      $this->executeBltUpdate($version);
    }
  }
375158
public function add($event) {
        $event->setParent($this->_parent);
        $this->_events[$event->getName()] = $event;
    }
1330717
protected static function bootLaravel(Event $event) {
        $dir = dirname($event->getComposer()->getConfig()->get('vendor-dir'));

        require $dir . '/bootstrap/autoload.php';

        /* @var $app \Illuminate\Foundation\Application */
        self::$app = require_once $dir . '/bootstrap/app.php';

        self::$kernel = $app->make(\Illuminate\Contracts\Console\Kernel::class);

        self::$kernel->bootstrap();

        self::instantiateConsoleInteraction($event);
    }
979788
public function onPostInstall(Event $event)
    {
        $lockFile = new JsonFile($this->lockFile);
        if ($lockFile->exists()) {
            $this->loadPackages($lockFile);
        } else {
            $this->scanPackages();
        }
        $this->runAction('install');
    }
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);
    }
280915
public static function cleanUpOldModules(Event $event)
    {
        $composer = $event->getComposer();
        $requires = $composer->getPackage()->getRequires();

        $projectPath = str_replace('vendor/vkf/shop', '', $composer->getInstallationManager()->getInstallpath($composer->getPackage()));
        $modulePath = $projectPath . 'htdocs/modules';
        foreach (array('ra', 'vkf') as $renzelVendorDir) {
            foreach (glob($modulePath . '/' . $renzelVendorDir . '/*') as $file) {
                if (is_dir($file)) {
                    $packageId = str_replace($modulePath . '/', '', $file);
                    if (!isset($requires[$packageId])) {
                        self::rmdir($file);
                        $event->getIO()->write('Deleted old package ' . $packageId);
                    }
                }
            }
        }
    }
181925
public function postOperation(Event $event)
    {
        $this->refreshPatchCollection();
        $patchCollection = $this->getPatchCollection();
        if ($patchCollection->isEmpty()) {
            $this->io->write('<info>No patches supplied.</info>');

            return;
        }
        $packages = $this->getLocalRepositoryPackages();
        foreach ($packages as $package) {
            if ($this->mustInstallPatchesForPackage($package)) {
                $this->installPatchesForPackage($package);
            }
        }
    }
537025
public static function postInstall(Event $event)
    {
        // Create core build file if it doesn't exist
        if (!file_exists('build.xml')) {
            $event->getIO()->write('build.xml does not exist, creating template');

            symlink('vendor/3ev/phingy/scripts/build.xml', 'build.xml');
        } else {
            $event->getIO()->write('build.xml exists, template not needed');
        }

        // Create project build file if it doesn't exist
        if (!file_exists('config/project.xml')) {
            $event->getIO()->write('config/project.xml does not exist, creating template');
            try {
                $temps   = implode(',', self::$templates);
                $default = self::$templates[0];

                $template = $event->getIO()->ask(
                    "Which template would you like to use ({$temps}) [{$default}] ? ", $default);
            } catch (Exception $e) {
                $template = $default;
            }

            copy("vendor/3ev/phingy/scripts/templates/{$template}.xml", 'config/project.xml');
        } else {
            $event->getIO()->write('config/project.xml exists, template not needed');
        }
    }
1227246
public function publishFiles(Event $event)
    {
        $cmd = $this->composer->getPackage()->getExtra()[self::PUBLISH_CMD] ?? null;

        if ($cmd === null) {
            return;
        }

        $packages = $this->composer->getRepositoryManager()->getLocalRepository()->getCanonicalPackages();

        foreach ($packages as $package) {
            $publish = $package->getExtra()[self::PUBLISH_KEY] ?? null;

            if (empty($publish)) {
                continue;
            }

            foreach ($publish as $data => $options) {
                $this->publish(
                    $cmd,
                    $this->composer->getInstallationManager()->getInstallPath($package),
                    $data,
                    $options
                );
            }
        }
    }
156691
public static function rootInstall(Event $event)
    {
        include getcwd() . '/vendor/autoload.php';

        $io = $event->getIO();

        static::genSecretCode($io);

        static::genSecretConfig($io);

        // Complete
        $io->write('Install complete.');
    }
749417
public function installHooks(Event $event) : void
    {
        $event->getIO()->write('CaptainHook Composer Plugin');
        if (!$this->isCaptainHookInstalled()) {
            // reload the autoloader to make sure CaptainHook is available
            $vendorDir = $event->getComposer()->getConfig()->get('vendor-dir');
            require $vendorDir . '/autoload.php';
        }

        if (!$this->isCaptainHookInstalled()) {
            // if CaptainHook is still not available end the plugin execution
            // normally this only happens if CaptainHook gets uninstalled
            $event->getIO()->write(
                '  <info>CaptainHook not properly installed try to run composer update</info>' . PHP_EOL .
                PHP_EOL .
                'If you are uninstalling CaptainHook, we are sad seeing you go, ' .
                'but we would appreciate your feedback on your experience.' . PHP_EOL .
                'Just go to https://github.com/CaptainHookPhp/captainhook/issues to leave your feedback' . PHP_EOL .
                PHP_EOL .
                '<comment>WARNING: Don\'t forget to deactivate the hooks in your .git/hooks directory.</comment>'
            );
            return;
        }
        Cmd::setup($event);
    }
712797
public static function installJSDependencies($event) {
        echo "Installing JS Library dependencies for the AltamiraBundle\n";
        $dir = getcwd();

        ScriptHandler::gitSubmodulesUpdate();
        ScriptHandler::cleanPublicJSDir();


        // discovered that assetic can minify all the code - all not necessary anymore.
        /*
        echo "Compiling jqplot\n";
        chdir(static::getLibsDir().DIRECTORY_SEPARATOR."jqplot");
        exec('ant clean min', $output, $status);
        if ($status) {
            die("Ant failed with $status (is ant installed?)\n");
        }
        chdir($dir);

        echo "Compiling flot\n";
        $flotLib=static::getLibsDir() .DIRECTORY_SEPARATOR."flot";
        if (($files = scandir($flotLib)) ===false ) {
            die("failed to traverse through flot directory");
        }
        foreach ($files as $file) {
            if (substr($file,-3) == ".js") {
                exec(static::getYUIBin(). " ".escapeshellarg($flotLib.DIRECTORY_SEPARATOR.$file)." -o "
                    .escapeshellarg(static::getLibsDir().DIRECTORY_SEPARATOR."flot".DIRECTORY_SEPARATOR.substr($file,0,-2)."min.js"));
            }
        }

        echo "Compiling flot bubbles\n";
        $flotBubblesLib=static::getLibsDir() .DIRECTORY_SEPARATOR."flot-bubbles";
        if (($files = scandir($flotBubblesLib)) ===false ) {
            die("failed to traverse through flot bubbles directory");
        }

        foreach ($files as $file) {
            if (substr($file,-3) == ".js") {
                // minification did not work out, so commented min code.
                // exec(static::getYUIBin(). " ".escapeshellarg($flotBubblesLib.DIRECTORY_SEPARATOR.$file) ." -o "
                //    .escapeshellarg(static::getLibsDir().DIRECTORY_SEPARATOR."flot-bubbles".DIRECTORY_SEPARATOR.substr($file,0,-2)."min.js"));

                // straight copy to min.js for compatibility with min setting in altamira
                copy($flotBubblesLib.DIRECTORY_SEPARATOR.$file,static::getLibsDir().DIRECTORY_SEPARATOR."flot-bubbles".DIRECTORY_SEPARATOR.substr($file,0,-2)."min.js");
            }
        }*/

        echo "Installing jqplot\n";
        mkdir(static::getJSDir().DIRECTORY_SEPARATOR."jqplot",0777,true);
        $source = static::getLibsDir().DIRECTORY_SEPARATOR."jqplot".DIRECTORY_SEPARATOR."src";
        $dest= static::getJSDir().DIRECTORY_SEPARATOR."jqplot";
        recursiveAssetsOnlyCopy($source,$dest);



        echo "Installing flot\n";
        mkdir(static::getJSDir().DIRECTORY_SEPARATOR."flot",0777,true);
        recursiveAssetsOnlyCopy(static::getLibsDir().DIRECTORY_SEPARATOR."flot",static::getJSDir().DIRECTORY_SEPARATOR."flot");


        echo "Installing flot-bubbles\n";
        mkdir(static::getJSDir().DIRECTORY_SEPARATOR."flot-bubbles",0777,true);
        recursiveAssetsOnlyCopy(static::getLibsDir().DIRECTORY_SEPARATOR."flot-bubbles",static::getJSDir().DIRECTORY_SEPARATOR."flot-bubbles");
    }
884812
public static function postInstall(Event $event): void
    {
        require_once $event->getComposer()->getConfig()->get('vendor-dir').'/autoload.php';

        self::clearCompiled();
    }
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();
    }
  }
236573
public static function installRequirementsFile(Event $event)
    {
        $options = static::getOptions($event);
        $appDir = $options['symfony-app-dir'];
        $fs = new Filesystem();

        $newDirectoryStructure = static::useNewDirectoryStructure($options);

        if (!$newDirectoryStructure) {
            if (!static::hasDirectory($event, 'symfony-app-dir', $appDir, 'install the requirements files')) {
                return;
            }
            $fs->copy(__DIR__.'/../Resources/skeleton/app/SymfonyRequirements.php', $appDir.'/SymfonyRequirements.php', true);
            $fs->copy(__DIR__.'/../Resources/skeleton/app/check.php', $appDir.'/check.php', true);
        } else {
            $binDir = $options['symfony-bin-dir'];
            $varDir = $options['symfony-var-dir'];
            if (!static::hasDirectory($event, 'symfony-var-dir', $varDir, 'install the requirements files')) {
                return;
            }
            if (!static::hasDirectory($event, 'symfony-bin-dir', $binDir, 'install the requirements files')) {
                return;
            }
            $fs->copy(__DIR__.'/../Resources/skeleton/app/SymfonyRequirements.php', $varDir.'/SymfonyRequirements.php', true);
            $fs->copy(__DIR__.'/../Resources/skeleton/app/check.php', $binDir.'/symfony_requirements', true);
            $fs->remove(array($appDir.'/check.php', $appDir.'/SymfonyRequirements.php', true));

            $fs->dumpFile($binDir.'/symfony_requirements', '#!/usr/bin/env php'."\n".str_replace(".'/SymfonyRequirements.php'", ".'/".$fs->makePathRelative(realpath($varDir), realpath($binDir))."SymfonyRequirements.php'", file_get_contents($binDir.'/symfony_requirements')));
            $fs->chmod($binDir.'/symfony_requirements', 0755);
        }

        $webDir = $options['symfony-web-dir'];

        // if the user has already removed the config.php file, do nothing
        // as the file must be removed for production use
        if ($fs->exists($webDir.'/config.php')) {
            $requiredDir = $newDirectoryStructure ? $varDir : $appDir;

            $fs->dumpFile($webDir.'/config.php', str_replace('/../app/SymfonyRequirements.php', '/'.$fs->makePathRelative(realpath($requiredDir), realpath($webDir)).'SymfonyRequirements.php', file_get_contents(__DIR__.'/../Resources/skeleton/web/config.php')));
        }
    }
1010084
public function onPostAutoloadDump(Event $event)
    {
        $this->io->overwriteError('<info>Assembling config files</info>');

        $this->builder = new Builder();

        $this->initAutoload();
        $this->scanPackages();
        $this->reorderFiles();
        $this->showDepsTree();

        $this->builder->buildAllConfigs($this->files);
    }