/** * Force regeneration of var/di, var/cache, var/generation on next object manager invocation * * @return void */ private function requestRegeneration() { if (is_writable($this->installer->getTargetDir() . $this->varFolder)) { $filename = $this->installer->getTargetDir() . $this->varFolder . $this->regenerate; touch($filename); } }
/** * Generate file with path to Composer 'vendor' dir to be used by the application * * @param \Composer\Composer $composer * @throws \UnexpectedValueException */ private function saveVendorDirPath(Composer $composer) { $magentoDir = $this->installer->getTargetDir(); $vendorDirPath = $this->filesystem->findShortestPath($magentoDir, realpath($composer->getConfig()->get('vendor-dir')), true); $vendorPathFile = $magentoDir . '/app/etc/vendor_path.php'; $content = <<<AUTOLOAD <?php /** * Path to Composer vendor directory */ return '{$vendorDirPath}'; AUTOLOAD; file_put_contents($vendorPathFile, $content); }