Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/dev/3.1' into 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
orocrmdeployer committed Feb 5, 2019
2 parents c32e533 + c244e6f commit 2745d9c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 84 deletions.
2 changes: 1 addition & 1 deletion config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ oro_distribution:

oro_require_js:
build_path: "js/oro.min.js"
building_timeout: 3600
build_timeout: 3600
build:
preserveLicenseComments: true

Expand Down
71 changes: 1 addition & 70 deletions var/OroRequirements.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
require_once __DIR__ . '/../var/SymfonyRequirements.php';

use Oro\Bundle\AssetBundle\NodeJsVersionChecker;
use Oro\Bundle\InstallerBundle\Process\PhpExecutableFinder;
use Oro\Bundle\AssetBundle\NodeJsExecutableFinder;

use Symfony\Component\Intl\Intl;
Expand Down Expand Up @@ -174,21 +173,6 @@ class_exists('COM'),
);
}

// Web installer specific checks
if ('cli' !== PHP_SAPI) {
$output = $this->checkCliRequirements();

$requirement = new CliRequirement(
!$output,
'Requirements validation for PHP CLI',
'If you have multiple PHP versions installed, you need to configure ORO_PHP_PATH variable with PHP binary path used by web server'
);

$requirement->setOutput($output);

$this->add($requirement);
}

$baseDir = realpath(__DIR__ . '/..');
$mem = $this->getBytes(ini_get('memory_limit'));

Expand Down Expand Up @@ -307,8 +291,7 @@ public function getMandatoryRequirements()
$this->getRequirements(),
function ($requirement) {
return !($requirement instanceof PhpIniRequirement)
&& !($requirement instanceof OroRequirement)
&& !($requirement instanceof CliRequirement);
&& !($requirement instanceof OroRequirement);
}
);
}
Expand Down Expand Up @@ -343,19 +326,6 @@ function ($requirement) {
);
}

/**
* @return array
*/
public function getCliRequirements()
{
return array_filter(
$this->getRequirements(),
function ($requirement) {
return $requirement instanceof CliRequirement;
}
);
}

/**
* @param string $val
* @return int
Expand Down Expand Up @@ -448,47 +418,8 @@ protected function checkFileNameLength()

return $fileLength >= 242;
}

/**
* @return null|string
*/
protected function checkCliRequirements()
{
$finder = new PhpExecutableFinder();
$command = sprintf(
'%s %soro-check.php',
$finder->find(),
__DIR__ . DIRECTORY_SEPARATOR
);

return shell_exec($command);
}
}

class OroRequirement extends Requirement
{
}

class CliRequirement extends Requirement
{
/**
* @var string
*/
protected $output;

/**
* @return string
*/
public function getOutput()
{
return $this->output;
}

/**
* @param string $output
*/
public function setOutput($output)
{
$this->output = $output;
}
}
13 changes: 0 additions & 13 deletions var/oro-check.php

This file was deleted.

0 comments on commit 2745d9c

Please sign in to comment.