removed php executable finder
This commit is contained in:
@ -2,15 +2,14 @@
|
||||
|
||||
namespace App\Utilities;
|
||||
|
||||
use Illuminate\Support\ProcessUtils;
|
||||
use Symfony\Component\Process\PhpExecutableFinder;
|
||||
use Illuminate\Console\Application;
|
||||
use Symfony\Component\Process\Process;
|
||||
|
||||
class Console
|
||||
{
|
||||
public static function run($string, $all_output = false, $timeout = 0)
|
||||
{
|
||||
$command = static::formatCommandString($string);
|
||||
$command = Application::formatCommandString($string);
|
||||
|
||||
logger('Console command:: ' . $command);
|
||||
|
||||
@ -29,21 +28,4 @@ class Console
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
public static function getPhpBinary()
|
||||
{
|
||||
$bin = ProcessUtils::escapeArgument((new PhpExecutableFinder)->find(false));
|
||||
|
||||
return !empty($bin) ? $bin : 'php';
|
||||
}
|
||||
|
||||
public static function getArtisanBinary()
|
||||
{
|
||||
return defined('ARTISAN_BINARY') ? ProcessUtils::escapeArgument(ARTISAN_BINARY) : 'artisan';
|
||||
}
|
||||
|
||||
public static function formatCommandString($string)
|
||||
{
|
||||
return sprintf('%s %s %s', static::getPhpBinary(), static::getArtisanBinary(), $string);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user