Example #1
0
        exit(sprintf($message, $path));
    }
    return $path;
}
$argv = $_SERVER['argv'];
$autoloadDir = $bootstrapDir = null;
$useNewDirectoryStructure = false;
// allow the base path to be passed as the first argument, or default
if (!empty($argv[1])) {
    $bootstrapDir = getRealpath($argv[1]);
}
if (!empty($argv[2])) {
    $autoloadDir = getRealpath($argv[2]);
}
if (!empty($argv[3])) {
    $useNewDirectoryStructure = true;
}
$rootDir = __DIR__ . '/../../../../../../../..';
if (null === $autoloadDir) {
    $autoloadDir = getRealpath($rootDir . '/app', 'Looks like you don\'t have a standard layout.');
}
if (null === $bootstrapDir) {
    $bootstrapDir = $autoloadDir;
    if ($useNewDirectoryStructure) {
        $bootstrapDir = getRealpath($rootDir . '/var');
    }
}
require_once $autoloadDir . '/autoload.php';
// here we pass realpaths as resolution between absolute and relative path can be wrong
ScriptHandler::doBuildBootstrap($bootstrapDir);
#!/usr/bin/env php
<?php 
/*
 * This file is part of the Symfony Standard Edition.
 *
 * (c) Fabien Potencier <*****@*****.**>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
if (PHP_SAPI !== 'cli') {
    echo __FILE__ . ' should be invoked via the CLI version of PHP, not the ' . PHP_SAPI . ' SAPI' . PHP_EOL;
    exit(1);
}
$argv = $_SERVER['argv'];
// allow the base path to be passed as the first argument, or default
if (isset($argv[1])) {
    $appDir = $argv[1];
} else {
    if (!($appDir = realpath(__DIR__ . '/../../../../../../../../app'))) {
        exit('Looks like you don\'t have a standard layout.');
    }
}
require_once $appDir . '/autoload.php';
\Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::doBuildBootstrap($appDir);
        exit(sprintf($message, $path));
    }
    return $path;
}
$argv = $_SERVER['argv'];
$autoloadDir = $bootstrapDir = null;
$useNewDirectoryStructure = false;
// allow the base path to be passed as the first argument, or default
if (!empty($argv[1])) {
    $bootstrapDir = getRealpath($argv[1]);
}
if (!empty($argv[2])) {
    $autoloadDir = getRealpath($argv[2]);
}
if (!empty($argv[3])) {
    $useNewDirectoryStructure = true;
}
$rootDir = __DIR__ . '/../../../../../../../..';
if (null === $autoloadDir) {
    $autoloadDir = getRealpath($rootDir . '/app', 'Looks like you don\'t have a standard layout.');
}
if (null === $bootstrapDir) {
    $bootstrapDir = $autoloadDir;
    if ($useNewDirectoryStructure) {
        $bootstrapDir = getRealpath($rootDir . '/var');
    }
}
require_once $autoloadDir . '/autoload.php';
// here we pass realpaths as resolution between absolute and relative path can be wrong
ScriptHandler::doBuildBootstrap($bootstrapDir, $autoloadDir, $useNewDirectoryStructure);
 /**
  * Runs the post install commands.
  *
  * @return Response|null
  */
 public function runPostInstallCommands()
 {
     $rootDir = $this->getContainerParameter('kernel.root_dir');
     $response = $this->runCommand(new AssetsInstallCommand(), new ArgvInput(['assets:install', '--relative', $rootDir . '/../web']));
     if (null !== $response) {
         return $response;
     }
     // Add the Contao directories
     if (null !== ($response = $this->runCommand(new InstallCommand()))) {
         return $response;
     }
     // Generate the symlinks
     if (null !== ($response = $this->runCommand(new SymlinksCommand()))) {
         return $response;
     }
     // Build the bootstrap.php.cache file
     ScriptHandler::doBuildBootstrap($this->getContainerParameter('kernel.cache_dir') . '/../..');
     return null;
 }