1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-06 08:40:09 +01:00

Maintain compatibility with the old name of the PHP version

This commit is contained in:
Jesus Urrutia
2018-04-09 11:20:19 -03:00
parent ab8705425c
commit b52ae454a2
3 changed files with 27 additions and 5 deletions

View File

@@ -111,10 +111,11 @@ function fpmConfigPath()
$confLookup = [];
foreach (Brew::SUPPORTED_PHP_VERSIONS as $version) {
$versionNormalized = preg_replace('/([^\d\.])/', '', $version);
$versionNormalized = $versionNormalized === ''
? '7.2'
: $versionNormalized;
$versionNormalized = preg_replace(
'/php@?(\d)\.?(\d)/',
'$1.$2',
$version === 'php' ? Brew::LATEST_PHP_VERSION : $version
);
$confLookup[$version] = $versionNormalized === '5.6'
? '/usr/local/etc/php/5.6/php-fpm.conf'