mirror of
https://github.com/laravel/valet.git
synced 2026-02-04 16:10:08 +01:00
Update normalizePhpVersion regex
Handle "php@8.1" Simplify the entire method into one block Co-Authored-By: Nathan Morgan <nathan@fuelingtheweb.com>
This commit is contained in:
@@ -311,11 +311,7 @@ public function symlinkPrimaryValetSock($phpVersion)
|
||||
*/
|
||||
public function normalizePhpVersion($version)
|
||||
{
|
||||
if (strpos($version, 'php') === false) {
|
||||
$version = 'php'.$version;
|
||||
}
|
||||
|
||||
return preg_replace('/(php)([0-9+])(?:.)?([0-9+])/i', '$1@$2.$3', $version);
|
||||
return preg_replace('/(?:php@?)?([0-9+])(?:.)?([0-9+])/i', 'php@$1.$2', $version);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user