1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2025-08-10 21:10:08 +02:00

👌 Sort PHP versions, amend message

This commit is contained in:
2023-01-16 21:09:25 +01:00
parent 7c3f416789
commit a46602d4b4
3 changed files with 5 additions and 2 deletions

View File

@@ -116,7 +116,10 @@ class PhpEnv {
} }
availablePhpVersions = Array(supportedVersions) availablePhpVersions = Array(supportedVersions)
.sorted(by: { $0.versionCompare($1) == .orderedDescending })
incompatiblePhpVersions = Array(versions.subtracting(supportedByValet)) incompatiblePhpVersions = Array(versions.subtracting(supportedByValet))
.sorted(by: { $0.versionCompare($1) == .orderedDescending })
Log.info("The PHP versions that were detected are: \(availablePhpVersions)") Log.info("The PHP versions that were detected are: \(availablePhpVersions)")
Log.info("The PHP versions that were unsupported are: \(incompatiblePhpVersions)") Log.info("The PHP versions that were unsupported are: \(incompatiblePhpVersions)")

View File

@@ -66,7 +66,7 @@ extension StatusMenu {
func addSwitchToPhpMenuItems() { func addSwitchToPhpMenuItems() {
var shortcutKey = 1 var shortcutKey = 1
for index in (0..<PhpEnv.shared.availablePhpVersions.count).reversed() { for index in (0..<PhpEnv.shared.availablePhpVersions.count) {
// Get the short and long version // Get the short and long version
let shortVersion = PhpEnv.shared.availablePhpVersions[index] let shortVersion = PhpEnv.shared.availablePhpVersions[index]
let longVersion = PhpEnv.shared.cachedPhpInstallations[shortVersion]!.versionNumber let longVersion = PhpEnv.shared.cachedPhpInstallations[shortVersion]!.versionNumber

View File

@@ -571,7 +571,7 @@ If you are seeing this message but are confused why this folder has gone missing
%@ %@
Valet might break if you link these PHP versions so PHP Monitor won't let you switch to them."; Valet might break if you link these PHP versions so PHP Monitor won't let you switch to them.";
"startup.unsupported_versions_explanation.desc" = "If you need support for older versions of PHP, you may need to downgrade to an older versions of Valet. Otherwise, it might be a good idea to uninstall any outdated versions that are not in use."; "startup.unsupported_versions_explanation.desc" = "If you need support for older versions of PHP, you may need to downgrade to an older versions of Valet. Otherwise, it might be a good idea to uninstall any outdated versions that are not in use. This message will only be removed after restarting PHP Monitor.";
// Sponsor encouragement // Sponsor encouragement
"startup.sponsor_encouragement.title" = "If PHP Monitor has been useful to you or your company, please consider leaving a tip."; "startup.sponsor_encouragement.title" = "If PHP Monitor has been useful to you or your company, please consider leaving a tip.";