Skip to content

Commit

Permalink
Backwards compatbility for running commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Mischa Braam committed Nov 29, 2021
1 parent 50f072c commit c3cb225
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased](https://github.com/weprovide/valet-plus/compare/2.1.0...2.x)
- [#587] Minimum version of symfony/process causes fatal error

## [2.2.1](https://github.com/weprovide/valet-plus/compare/2.2.0...2.2.1)
- Fix missing dependencies of sebastian/version

## [2.2.0](https://github.com/weprovide/valet-plus/compare/2.1.0...2.2.0)
- [#517] Nginx config changes for fastcgi_buffers
- [#554] Fix for Brew 2.7.0: brew list without commands
- [#551] Replace hardcoded Elasticsearch versions by fetching from Brew
- [#546] Add support for PHP 8.0
- [#583] Add support for ioncube on PHP 7.4
- Add --build-from-source when installing PHP
- Use PHP 7.2 as default version

## [2.1.0](https://github.com/weprovide/valet-plus/compare/2.0.0...2.1.0)
Expand Down
7 changes: 6 additions & 1 deletion cli/Valet/CommandLine.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,12 @@ public function runCommand($command, callable $onError = null)
$onError = $onError ?: function () {
};

$process = Process::fromShellCommandline($command);
$process = null;
if (is_callable(Process::class, 'fromShellCommandline')) {
$process = Process::fromShellCommandline($command);
} else {
$process = new Process($command);
}

$processOutput = '';
$process->setTimeout(null)->run(function ($type, $line) use (&$processOutput) {
Expand Down

0 comments on commit c3cb225

Please sign in to comment.