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

👌 Handle correct version number

This commit is contained in:
2022-03-23 18:15:17 +01:00
parent 9a326928f3
commit 649a3f4fb5

View File

@ -116,15 +116,15 @@ class Valet {
installed is not recent enough. installed is not recent enough.
*/ */
public func validateVersion() -> Void { public func validateVersion() -> Void {
if Shell.pipe("valet", requiresPath: true).contains("isolate") { if version.versionCompare("3.0") == .orderedAscending {
// < 3.0: This version still supports PHP 5.6
self.features.append(.supportForPhp56)
} else {
// >= 3.0: This version introduces isolation but drops PHP 5.6 support
Log.info("This version of Valet supports isolation.") Log.info("This version of Valet supports isolation.")
self.features.append(.isolatedSites) self.features.append(.isolatedSites)
} }
if version.versionCompare("3.0") == .orderedAscending {
self.features.append(.supportForPhp56)
}
if version.versionCompare(Constants.MinimumRecommendedValetVersion) == .orderedAscending { if version.versionCompare(Constants.MinimumRecommendedValetVersion) == .orderedAscending {
let version = version let version = version
Log.warn("Valet version \(version!) is too old! (recommended: \(Constants.MinimumRecommendedValetVersion))") Log.warn("Valet version \(version!) is too old! (recommended: \(Constants.MinimumRecommendedValetVersion))")