public function __construct() { parent::__construct(); $baseDir = realpath(__DIR__ . '/..'); $this->addDiamanteDeskRequirement(is_writable($baseDir . '/app/attachments'), 'app/attachments/ directory must be writable', 'Change the permissions of the "<strong>app/attachments/</strong>" directory so that the web server can write into it.'); $this->addRecommendation($this->IsNpmInstalled(), 'npm package manager is installed', 'Install <strong>npm</strong> package manager.'); $this->addRecommendation($this->IsGruntAndBowerInstalled(), 'grunt and bower packages are installed', 'Install <strong>grunt and bower</strong> packages.'); }
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; }
/** * {@inheritdoc} */ public function getMandatoryRequirements() { return array_filter(parent::getMandatoryRequirements(), function ($requirement) { return !$requirement instanceof PimRequirement; }); }
if (is_array($data) && isset($data['parameters']) && isset($data['parameters']['installed']) && false != $data['parameters']['installed']) { require_once __DIR__ . '/../app/DistributionKernel.php'; $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 require_once dirname(__FILE__) . '/OroRequirements.php'; require_once dirname(__FILE__) . '/../vendor/autoload.php'; $oroRequirements = new OroRequirements(); foreach ($oroRequirements->getRequirements() as $requirement) { /** @var Requirement $requirement */ if (!$requirement->isFulfilled()) { echo $requirement->getTestMessage() . "\n"; } }