Exemplo n.º 1
0
 private function getPhp()
 {
     $phpFinder = new PhpExecutableFinder();
     if (!($phpPath = $phpFinder->find())) {
         throw new \RuntimeException('The php executable could not be found, add it to your PATH environment variable and try again');
     }
     return $phpPath;
 }
 /**
  * @return null|string
  */
 protected function checkCliRequirements()
 {
     $finder = new PhpExecutableFinder();
     $command = sprintf('%s %scheck.php', $finder->find(), __DIR__ . DIRECTORY_SEPARATOR);
     exec($command, $output, $exitCode);
     if ($exitCode) {
         return $this->getErrorMessage($output);
     }
     return $exitCode;
 }
 /**
  * @return null|string
  */
 protected function checkCliRequirements()
 {
     $finder = new PhpExecutableFinder();
     $command = sprintf('%s %soro-check.php', $finder->find(), __DIR__ . DIRECTORY_SEPARATOR);
     return shell_exec($command);
 }
Exemplo n.º 4
0
 /**
  * Finds the PHP executable.
  *
  * @return string
  * @throws FileNotFoundException
  */
 protected function getPhp()
 {
     $phpFinder = new PhpExecutableFinder();
     $phpPath = $phpFinder->find();
     if (!$phpPath) {
         throw new FileNotFoundException('The PHP executable could not be found.');
     }
     return $phpPath;
 }
Exemplo n.º 5
0
 /**
  * Get command line to run job queue
  *
  * @return string
  */
 protected function getQueueRunCmd()
 {
     if (!$this->phpExec) {
         $finder = new PhpExecutableFinder();
         $this->phpExec = escapeshellarg($finder->find());
     }
     $runCommand = sprintf('%s %sconsole jms-job-queue:run --max-runtime=999999999 --max-concurrent-jobs=%u --env=%s', $this->phpExec, $this->rootDir . DIRECTORY_SEPARATOR, max($this->maxJobs, 1), escapeshellarg($this->env));
     return $runCommand;
 }