You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (strpos($this->brew->determineAliasedVersion($version), '@')) {
211
-
return$version;
212
-
}
213
-
214
-
if ($this->brew->hasInstalledPhp()) {
215
-
thrownewDomainException('Brew is already using PHP '.PHP_VERSION.' as \'php\' in Homebrew. To use another version, please specify. eg: [email protected]');
216
-
}
217
-
}
228
+
$version = $this->normalizePhpVersion($version);
218
229
219
230
if (!$this->brew->supportedPhpVersions()->contains($version)) {
220
231
thrownewDomainException(
@@ -225,6 +236,20 @@ function validateRequestedVersion($version)
225
236
);
226
237
}
227
238
239
+
if (strpos($aliasedVersion = $this->brew->determineAliasedVersion($version), '@')) {
240
+
return$aliasedVersion;
241
+
}
242
+
243
+
if ($version === 'php') {
244
+
if (strpos($aliasedVersion = $this->brew->determineAliasedVersion($version), '@')) {
245
+
return$aliasedVersion;
246
+
}
247
+
248
+
if ($this->brew->hasInstalledPhp()) {
249
+
thrownewDomainException('Brew is already using PHP '.PHP_VERSION.' as \'php\' in Homebrew. To use another version, please specify. eg: [email protected]');
0 commit comments