mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2026-03-30 16:30:09 +02:00
🚧 WIP: Adds support to PHP 7.4
(PHP 7.4 isn't out for Homebrew just yet.)
This commit is contained in:
@@ -30,8 +30,8 @@ class Actions {
|
||||
availableVersions.forEach { (version) in
|
||||
Shell.user.run("brew unlink php@\(version)")
|
||||
}
|
||||
if (availableVersions.contains("7.3")) {
|
||||
Shell.user.run("brew link php@7.3")
|
||||
if (availableVersions.contains("7.4")) {
|
||||
Shell.user.run("brew link php@7.4")
|
||||
if (version == Constants.LatestPhpVersion) {
|
||||
Shell.user.run("valet use php")
|
||||
} else {
|
||||
|
||||
@@ -19,9 +19,9 @@ class Startup {
|
||||
)
|
||||
|
||||
self.presentAlertOnMainThreadIf(
|
||||
!Shell.user.pipe("ls /usr/local/opt | grep php@7.3").contains("php@7.3"),
|
||||
messageText: "PHP 7.3 is not correctly installed",
|
||||
informativeText: "PHP 7.3 alias was not found in `/usr/local/opt`. The app will not work correctly until you resolve this issue."
|
||||
!Shell.user.pipe("ls /usr/local/opt | grep php@7.4").contains("php@7.4"),
|
||||
messageText: "PHP 7.4 is not correctly installed",
|
||||
informativeText: "PHP 7.4 alias was not found in `/usr/local/opt`. The app will not work correctly until you resolve this issue."
|
||||
)
|
||||
|
||||
self.presentAlertOnMainThreadIf(
|
||||
|
||||
@@ -14,13 +14,13 @@ class Constants {
|
||||
* The PHP versions supported by this application.
|
||||
*/
|
||||
static let SupportedPhpVersions = [
|
||||
"5.6", "7.0", "7.1", "7.2", "7.3"
|
||||
"5.6", "7.0", "7.1", "7.2", "7.3", "7.4"
|
||||
]
|
||||
|
||||
/**
|
||||
Which php version is aliased as `php` to brew?
|
||||
This is usually the latest PHP version.
|
||||
*/
|
||||
static let LatestPhpVersion = "7.3"
|
||||
static let LatestPhpVersion = "7.4"
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user