Skip to content

Commit

Permalink
BAP-17932: Remove deprecated class Oro\Bundle\InstallerBundle\Process…
Browse files Browse the repository at this point in the history
…\PhpExecutableFinder (3.1) (#22130)

 - add note to platform changelog
 - remove dead code (for checking php cli requirements in case of installing app from the web installer which was removed before)
  • Loading branch information
aivus authored Feb 1, 2019
1 parent 6b4ad10 commit 38f7cd8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 83 deletions.
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 38f7cd8

Please sign in to comment.