-
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Note: The terminal output work-in-progress is currently disabled in this particular commit.
- Loading branch information
1 parent
78702ae
commit 1bfcdd5
Showing
5 changed files
with
39 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// | ||
// Constants.swift | ||
// phpmon | ||
// | ||
// Created by Nico Verbruggen on 08/07/2019. | ||
// Copyright © 2019 Nico Verbruggen. All rights reserved. | ||
// | ||
|
||
import Cocoa | ||
|
||
class Constants { | ||
|
||
/** | ||
* The PHP versions supported by this application. | ||
*/ | ||
static let SupportedPhpVersions = [ | ||
"5.6", "7.0", "7.1", "7.2", "7.3" | ||
] | ||
|
||
/** | ||
Which php version is aliased as `php` to brew? | ||
This is usually the latest PHP version. | ||
*/ | ||
static let LatestPhpVersion = "7.3" | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,11 @@ class Services { | |
} | ||
if (availableVersions.contains("7.3")) { | ||
_ = Shell.execute(command: "brew link [email protected]") | ||
_ = Shell.execute(command: "valet use php@\(version)") | ||
if (version == Constants.LatestPhpVersion) { | ||
_ = Shell.execute(command: "valet use php") | ||
} else { | ||
_ = Shell.execute(command: "valet use php@\(version)") | ||
} | ||
} | ||
} | ||
|
||
|