mirror of
https://github.com/laravel/valet.git
synced 2026-02-05 00:20:08 +01:00
PHP 8.2 support (#1279)
* PHP 8.2 support * wip * Apply fixes from StyleCI * wip * wip * wip * Update tests.yml Co-authored-by: StyleCI Bot <bot@styleci.io>
This commit is contained in:
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
php: ['7.0', 7.1, 7.2, 7.3, 7.4, '8.0', 8.1]
|
php: ['7.0', 7.1, 7.2, 7.3, 7.4, '8.0', 8.1, 8.2]
|
||||||
|
|
||||||
name: PHP ${{ matrix.php }}
|
name: PHP ${{ matrix.php }}
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ class Brew
|
|||||||
{
|
{
|
||||||
const SUPPORTED_PHP_VERSIONS = [
|
const SUPPORTED_PHP_VERSIONS = [
|
||||||
'php',
|
'php',
|
||||||
|
'php@8.2',
|
||||||
'php@8.1',
|
'php@8.1',
|
||||||
'php@8.0',
|
'php@8.0',
|
||||||
'php@7.4',
|
'php@7.4',
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ public function fpmConfigPath($phpVersion = null)
|
|||||||
$versionNormalized = $this->normalizePhpVersion($phpVersion === 'php' ? Brew::LATEST_PHP_VERSION : $phpVersion);
|
$versionNormalized = $this->normalizePhpVersion($phpVersion === 'php' ? Brew::LATEST_PHP_VERSION : $phpVersion);
|
||||||
$versionNormalized = preg_replace('~[^\d\.]~', '', $versionNormalized);
|
$versionNormalized = preg_replace('~[^\d\.]~', '', $versionNormalized);
|
||||||
|
|
||||||
return BREW_PREFIX."/etc/php/${versionNormalized}/php-fpm.d/valet-fpm.conf";
|
return BREW_PREFIX."/etc/php/{$versionNormalized}/php-fpm.d/valet-fpm.conf";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
backupStaticAttributes="false"
|
backupStaticAttributes="false"
|
||||||
bootstrap="vendor/autoload.php"
|
bootstrap="vendor/autoload.php"
|
||||||
colors="true"
|
colors="true"
|
||||||
|
convertDeprecationsToExceptions="true"
|
||||||
convertErrorsToExceptions="true"
|
convertErrorsToExceptions="true"
|
||||||
convertNoticesToExceptions="true"
|
convertNoticesToExceptions="true"
|
||||||
convertWarningsToExceptions="true"
|
convertWarningsToExceptions="true"
|
||||||
|
|||||||
@@ -62,6 +62,10 @@ public function test_has_installed_php_indicates_if_php_is_installed_via_brew()
|
|||||||
$brew->shouldReceive('installedPhpFormulae')->andReturn(collect(['php@5.5']));
|
$brew->shouldReceive('installedPhpFormulae')->andReturn(collect(['php@5.5']));
|
||||||
$this->assertFalse($brew->hasInstalledPhp());
|
$this->assertFalse($brew->hasInstalledPhp());
|
||||||
|
|
||||||
|
$brew = Mockery::mock(Brew::class.'[installedPhpFormulae]', [new CommandLine, new Filesystem]);
|
||||||
|
$brew->shouldReceive('installedPhpFormulae')->andReturn(collect(['php@8.2']));
|
||||||
|
$this->assertTrue($brew->hasInstalledPhp());
|
||||||
|
|
||||||
$brew = Mockery::mock(Brew::class.'[installedPhpFormulae]', [new CommandLine, new Filesystem]);
|
$brew = Mockery::mock(Brew::class.'[installedPhpFormulae]', [new CommandLine, new Filesystem]);
|
||||||
$brew->shouldReceive('installedPhpFormulae')->andReturn(collect(['php@8.1']));
|
$brew->shouldReceive('installedPhpFormulae')->andReturn(collect(['php@8.1']));
|
||||||
$this->assertTrue($brew->hasInstalledPhp());
|
$this->assertTrue($brew->hasInstalledPhp());
|
||||||
|
|||||||
Reference in New Issue
Block a user