1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-04 08:10:07 +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:
Dries Vints
2022-09-08 13:37:17 +02:00
committed by GitHub
parent bc56e30185
commit d0d42acff7
5 changed files with 8 additions and 2 deletions

View File

@@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: true
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 }}

View File

@@ -9,6 +9,7 @@ class Brew
{
const SUPPORTED_PHP_VERSIONS = [
'php',
'php@8.2',
'php@8.1',
'php@8.0',
'php@7.4',

View File

@@ -168,7 +168,7 @@ public function fpmConfigPath($phpVersion = null)
$versionNormalized = $this->normalizePhpVersion($phpVersion === 'php' ? Brew::LATEST_PHP_VERSION : $phpVersion);
$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";
}
/**

View File

@@ -3,6 +3,7 @@
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertDeprecationsToExceptions="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"

View File

@@ -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']));
$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->shouldReceive('installedPhpFormulae')->andReturn(collect(['php@8.1']));
$this->assertTrue($brew->hasInstalledPhp());