mirror of
https://github.com/laravel/valet.git
synced 2026-02-06 16:50:09 +01:00
Support php@8.0 and php@8.1
This commit is contained in:
@@ -8,6 +8,8 @@ class Brew
|
||||
{
|
||||
const SUPPORTED_PHP_VERSIONS = [
|
||||
'php',
|
||||
'php@8.1',
|
||||
'php@8.0',
|
||||
'php@7.4',
|
||||
'php@7.3',
|
||||
'php@7.2',
|
||||
|
||||
@@ -71,6 +71,8 @@ public function test_has_installed_php_indicates_if_php_is_installed_via_brew()
|
||||
{
|
||||
$brew = Mockery::mock(Brew::class.'[installed]', [new CommandLine, new Filesystem]);
|
||||
$brew->shouldReceive('installed')->with('php')->andReturn(true);
|
||||
$brew->shouldReceive('installed')->with('php@8.1')->andReturn(true);
|
||||
$brew->shouldReceive('installed')->with('php@8.0')->andReturn(true);
|
||||
$brew->shouldReceive('installed')->with('php@7.4')->andReturn(true);
|
||||
$brew->shouldReceive('installed')->with('php@7.3')->andReturn(false);
|
||||
$brew->shouldReceive('installed')->with('php@7.2')->andReturn(true);
|
||||
@@ -87,6 +89,8 @@ public function test_has_installed_php_indicates_if_php_is_installed_via_brew()
|
||||
|
||||
$brew = Mockery::mock(Brew::class.'[installed]', [new CommandLine, new Filesystem]);
|
||||
$brew->shouldReceive('installed')->with('php')->andReturn(true);
|
||||
$brew->shouldReceive('installed')->with('php@8.1')->andReturn(false);
|
||||
$brew->shouldReceive('installed')->with('php@8.0')->andReturn(false);
|
||||
$brew->shouldReceive('installed')->with('php@7.4')->andReturn(false);
|
||||
$brew->shouldReceive('installed')->with('php@7.3')->andReturn(true);
|
||||
$brew->shouldReceive('installed')->with('php@7.2')->andReturn(false);
|
||||
@@ -103,6 +107,8 @@ public function test_has_installed_php_indicates_if_php_is_installed_via_brew()
|
||||
|
||||
$brew = Mockery::mock(Brew::class.'[installed]', [new CommandLine, new Filesystem]);
|
||||
$brew->shouldReceive('installed')->with('php')->andReturn(true);
|
||||
$brew->shouldReceive('installed')->with('php@8.1')->andReturn(false);
|
||||
$brew->shouldReceive('installed')->with('php@8.0')->andReturn(false);
|
||||
$brew->shouldReceive('installed')->with('php@7.4')->andReturn(false);
|
||||
$brew->shouldReceive('installed')->with('php@7.3')->andReturn(false);
|
||||
$brew->shouldReceive('installed')->with('php@7.2')->andReturn(true);
|
||||
@@ -119,6 +125,8 @@ public function test_has_installed_php_indicates_if_php_is_installed_via_brew()
|
||||
|
||||
$brew = Mockery::mock(Brew::class.'[installed]', [new CommandLine, new Filesystem]);
|
||||
$brew->shouldReceive('installed')->with('php')->andReturn(false);
|
||||
$brew->shouldReceive('installed')->with('php@8.1')->andReturn(false);
|
||||
$brew->shouldReceive('installed')->with('php@8.0')->andReturn(false);
|
||||
$brew->shouldReceive('installed')->with('php@7.4')->andReturn(false);
|
||||
$brew->shouldReceive('installed')->with('php@7.3')->andReturn(false);
|
||||
$brew->shouldReceive('installed')->with('php@7.2')->andReturn(false);
|
||||
@@ -135,6 +143,8 @@ public function test_has_installed_php_indicates_if_php_is_installed_via_brew()
|
||||
|
||||
$brew = Mockery::mock(Brew::class.'[installed]', [new CommandLine, new Filesystem]);
|
||||
$brew->shouldReceive('installed')->with('php')->andReturn(false);
|
||||
$brew->shouldReceive('installed')->with('php@8.1')->andReturn(false);
|
||||
$brew->shouldReceive('installed')->with('php@8.0')->andReturn(false);
|
||||
$brew->shouldReceive('installed')->with('php@7.4')->andReturn(false);
|
||||
$brew->shouldReceive('installed')->with('php@7.3')->andReturn(false);
|
||||
$brew->shouldReceive('installed')->with('php@7.2')->andReturn(false);
|
||||
@@ -151,6 +161,8 @@ public function test_has_installed_php_indicates_if_php_is_installed_via_brew()
|
||||
|
||||
$brew = Mockery::mock(Brew::class.'[installed]', [new CommandLine, new Filesystem]);
|
||||
$brew->shouldReceive('installed')->with('php')->andReturn(false);
|
||||
$brew->shouldReceive('installed')->with('php@8.1')->andReturn(false);
|
||||
$brew->shouldReceive('installed')->with('php@8.0')->andReturn(false);
|
||||
$brew->shouldReceive('installed')->with('php@7.4')->andReturn(false);
|
||||
$brew->shouldReceive('installed')->with('php@7.3')->andReturn(false);
|
||||
$brew->shouldReceive('installed')->with('php@7.2')->andReturn(false);
|
||||
@@ -167,6 +179,8 @@ public function test_has_installed_php_indicates_if_php_is_installed_via_brew()
|
||||
|
||||
$brew = Mockery::mock(Brew::class.'[installed]', [new CommandLine, new Filesystem]);
|
||||
$brew->shouldReceive('installed')->with('php')->andReturn(false);
|
||||
$brew->shouldReceive('installed')->with('php@8.1')->andReturn(false);
|
||||
$brew->shouldReceive('installed')->with('php@8.0')->andReturn(false);
|
||||
$brew->shouldReceive('installed')->with('php@7.4')->andReturn(false);
|
||||
$brew->shouldReceive('installed')->with('php@7.3')->andReturn(false);
|
||||
$brew->shouldReceive('installed')->with('php@7.2')->andReturn(false);
|
||||
|
||||
Reference in New Issue
Block a user