protected function checkStep(InputInterface $input, OutputInterface $output)
 {
     $output->writeln('<info>Oro requirements check:</info>');
     if (!class_exists('OroRequirements')) {
         require_once $this->getContainer()->getParameter('kernel.root_dir') . DIRECTORY_SEPARATOR . 'OroRequirements.php';
     }
     $collection = new \OroRequirements();
     $this->renderTable($collection->getMandatoryRequirements(), 'Mandatory requirements', $output);
     $this->renderTable($collection->getPhpIniRequirements(), 'PHP settings', $output);
     $this->renderTable($collection->getOroRequirements(), 'Oro specific requirements', $output);
     $this->renderTable($collection->getRecommendations(), 'Optional recommendations', $output);
     if (count($collection->getFailedRequirements())) {
         throw new \RuntimeException('Some system requirements are not fulfilled. Please check output messages and fix them.');
     }
     $output->writeln('');
     return $this;
 }
Ejemplo n.º 2
0
        $kernel = new DistributionKernel('prod', false);
        $kernel->loadClassCache();
        $request = Request::createFromGlobals();
        $response = $kernel->handle($request);
        $response->send();
        $kernel->terminate($request, $response);
        exit;
    }
}
/**
 * @todo Identify correct locale (headers?)
 */
$locale = 'en';
$collection = new OroRequirements();
$translator = new Translator($locale);
$majorProblems = $collection->getFailedRequirements();
$minorProblems = $collection->getFailedRecommendations();
$translator->addLoader('yml', new YamlFileLoader());
$translator->addResource('yml', __DIR__ . '/../app/Resources/translations/install.' . $locale . '.yml', $locale);
function iterateRequirements(array $collection)
{
    foreach ($collection as $requirement) {
        ?>
    <tr>
        <td class="dark">
            <?php 
        if ($requirement->isFulfilled()) {
            ?>
            <span class="icon-yes">
            <?php 
        } elseif (!$requirement->isOptional()) {