From 052f0449e7b938c881f814246096dc97cce86527 Mon Sep 17 00:00:00 2001 From: Mateusz Drost Date: Sat, 12 Aug 2017 18:00:06 +0200 Subject: [PATCH] Throw LogicException when proc_open() is not installed --- src/Process.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Process.php b/src/Process.php index db53467..db9eacf 100644 --- a/src/Process.php +++ b/src/Process.php @@ -45,8 +45,7 @@ class Process extends EventEmitter * @param string $cwd Current working directory or null to inherit * @param array $env Environment variables or null to inherit * @param array $options Options for proc_open() - * @throws LogicException On windows - * @throws RuntimeException When proc_open() is not installed + * @throws LogicException On windows or when proc_open() is not installed */ public function __construct($cmd, $cwd = null, array $env = null, array $options = array()) { @@ -55,7 +54,7 @@ public function __construct($cmd, $cwd = null, array $env = null, array $options } if (!function_exists('proc_open')) { - throw new \RuntimeException('The Process class relies on proc_open(), which is not available on your PHP installation.'); + throw new \LogicException('The Process class relies on proc_open(), which is not available on your PHP installation.'); } $this->cmd = $cmd;