Skip to content

Commit dc29141

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 7e550f9 + 42e5fc3 commit dc29141

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+958
-1729
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.DS_Store
12
vendor/
23
composer.lock
34
error.log

.travis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
language: php
22

33
php:
4-
- 5.5
54
- 5.6
65
- 7.0
6+
- 7.1
77

88
env:
99
global:
@@ -15,6 +15,10 @@ sudo: false
1515
before_install:
1616
- travis_retry composer self-update
1717

18+
cache:
19+
directories:
20+
- $HOME/.composer/cache
21+
1822
install:
1923
- if [[ $setup = 'basic' ]]; then travis_retry composer install --no-interaction --prefer-dist; fi
2024
- if [[ $setup = 'stable' ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-stable; fi

bin/CaddyLicense.txt

Lines changed: 0 additions & 201 deletions
This file was deleted.

bin/caddy

-15.3 MB
Binary file not shown.

bin/ngrok

1.76 MB
Binary file not shown.

cli/Valet/Brew.php

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function __construct(CommandLine $cli, Filesystem $files)
3030
*/
3131
function installed($formula)
3232
{
33-
return in_array($formula, explode(PHP_EOL, $this->cli->run('brew list | grep '.$formula)));
33+
return in_array($formula, explode(PHP_EOL, $this->cli->runAsUser('brew list | grep '.$formula)));
3434
}
3535

3636
/**
@@ -40,7 +40,8 @@ function installed($formula)
4040
*/
4141
function hasInstalledPhp()
4242
{
43-
return $this->installed('php70')
43+
return $this->installed('php71')
44+
|| $this->installed('php70')
4445
|| $this->installed('php56')
4546
|| $this->installed('php55');
4647
}
@@ -49,40 +50,42 @@ function hasInstalledPhp()
4950
* Ensure that the given formula is installed.
5051
*
5152
* @param string $formula
53+
* @param array $options
5254
* @param array $taps
5355
* @return void
5456
*/
55-
function ensureInstalled($formula, array $taps = [])
57+
function ensureInstalled($formula, $options = [], $taps = [])
5658
{
5759
if (! $this->installed($formula)) {
58-
$this->installOrFail($formula, $taps);
60+
$this->installOrFail($formula, $options, $taps);
5961
}
6062
}
6163

6264
/**
6365
* Install the given formula and throw an exception on failure.
6466
*
6567
* @param string $formula
68+
* @param array $options
6669
* @param array $taps
6770
* @return void
6871
*/
69-
function installOrFail($formula, array $taps = [])
72+
function installOrFail($formula, $options = [], $taps = [])
7073
{
7174
if (count($taps) > 0) {
7275
$this->tap($taps);
7376
}
7477

7578
output('<info>['.$formula.'] is not installed, installing it now via Brew...</info> 🍻');
7679

77-
$this->cli->runAsUser('brew install '.$formula, function ($exitCode, $errorOutput) use ($formula) {
80+
$this->cli->runAsUser(trim('brew install '.$formula.' '.implode(' ', $options)), function ($exitCode, $errorOutput) use ($formula) {
7881
output($errorOutput);
7982

8083
throw new DomainException('Brew was unable to install ['.$formula.'].');
8184
});
8285
}
8386

8487
/**
85-
* Tag the given formulas.
88+
* Tap the given formulas.
8689
*
8790
* @param dynamic[string] $formula
8891
* @return void
@@ -137,7 +140,9 @@ function linkedPhp()
137140

138141
$resolvedPath = $this->files->readLink('/usr/local/bin/php');
139142

140-
if (strpos($resolvedPath, 'php70') !== false) {
143+
if (strpos($resolvedPath, 'php71') !== false) {
144+
return 'php71';
145+
} elseif (strpos($resolvedPath, 'php70') !== false) {
141146
return 'php70';
142147
} elseif (strpos($resolvedPath, 'php56') !== false) {
143148
return 'php56';

0 commit comments

Comments
 (0)