diff --git a/CHANGELOG.md b/CHANGELOG.md index a7773a7..26b9007 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## 0.8.3 (2018-12-03) + +### Updated + +- Support for `symfony/process 4.2`. + ## 0.8.2 (2018-10-25) ### Added diff --git a/composer.json b/composer.json index 4adf10b..fc6b312 100644 --- a/composer.json +++ b/composer.json @@ -30,17 +30,17 @@ "fig/http-message-util": "^1.1.2", "friendsofphp/php-cs-fixer": "^2.13", "guzzlehttp/guzzle": "^6.2", - "infection/infection": "^0.10", + "infection/infection": "^0.11", "jangregor/phpstan-prophecy": "^0.2", "monolog/monolog": "^1.23", "phpspec/prophecy": "^1.8", "phpstan/phpstan": "^0.10", "phpstan/phpstan-phpunit": "^0.10", "phpstan/phpstan-strict-rules": "^0.10", - "phpunit/phpunit": "^7.3", + "phpunit/phpunit": "^7.4", "psr/http-message": "^1.0.1", "roave/security-advisories": "dev-master", - "sebastianfeldmann/captainhook": "^2.1", + "captainhook/captainhook": "^2.2", "slevomat/coding-standard": "^4.8", "squizlabs/php_codesniffer": "^3.3", "zendframework/zend-servicemanager": "^3.3" @@ -62,7 +62,7 @@ } }, "scripts": { - "post-install-cmd": "\\SebastianFeldmann\\CaptainHook\\Composer\\Cmd::install", + "post-install-cmd": "\\CaptainHook\\CaptainHook\\Composer\\Cmd::install", "check": [ "@cs-check", "@phpstan" diff --git a/src/Common/Process/ProcessFactory.php b/src/Common/Process/ProcessFactory.php index a8363d2..9dbc7ad 100644 --- a/src/Common/Process/ProcessFactory.php +++ b/src/Common/Process/ProcessFactory.php @@ -26,7 +26,11 @@ public function __construct($command, ?ProcessParamsInterface $processParams = n public function __invoke(): Process { - $process = new Process($this->command); + if (!is_array($this->command)) { + $process = Process::fromShellCommandline($this->command); + } else { + $process = new Process($this->command); + } if ($this->processParams !== null) { $process->setTimeout($this->processParams->getTimeout()); $process->setIdleTimeout($this->processParams->getIdleTimeout()); diff --git a/tests/unit/Common/Exception/ProcessExceptionTest.php b/tests/unit/Common/Exception/ProcessExceptionTest.php index 56f395a..e11b024 100644 --- a/tests/unit/Common/Exception/ProcessExceptionTest.php +++ b/tests/unit/Common/Exception/ProcessExceptionTest.php @@ -14,7 +14,7 @@ class ProcessExceptionTest extends TestCase { public function testUsage(): void { - $process = new Process('ls -la'); + $process = new Process(['ls -la']); $se = new ProcessTimedOutException($process, ProcessTimedOutException::TYPE_GENERAL); $e = new ProcessException($process, $se);