mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-11-09 13:10:24 +01:00
👌 Suggestions should also check all constraints
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
struct HomebrewService: Decodable {
|
struct HomebrewService: Decodable, Equatable {
|
||||||
let name: String
|
let name: String
|
||||||
let service_name: String
|
let service_name: String
|
||||||
let running: Bool
|
let running: Bool
|
||||||
|
|||||||
@@ -94,7 +94,9 @@ class SiteListCell: NSTableCellView
|
|||||||
|
|
||||||
// Determine which installed versions would be ideal to switch to,
|
// Determine which installed versions would be ideal to switch to,
|
||||||
// but make sure to exclude the currently linked version
|
// but make sure to exclude the currently linked version
|
||||||
PhpEnv.shared.validVersions(for: site.composerPhp).filter({ version in
|
site.composerPhp.split(separator: "|").flatMap { string in
|
||||||
|
return PhpEnv.shared.validVersions(for: string.trimmingCharacters(in: .whitespacesAndNewlines))
|
||||||
|
}.filter({ version in
|
||||||
version.homebrewVersion != PhpEnv.phpInstall.version.short
|
version.homebrewVersion != PhpEnv.phpInstall.version.short
|
||||||
}).forEach { version in
|
}).forEach { version in
|
||||||
alert.addButton(withTitle: "Switch to PHP \(version.homebrewVersion)")
|
alert.addButton(withTitle: "Switch to PHP \(version.homebrewVersion)")
|
||||||
|
|||||||
Reference in New Issue
Block a user