diff --git a/phpmon/Domain/Integrations/Valet/Valet.swift b/phpmon/Domain/Integrations/Valet/Valet.swift index 14bf0f7..746940c 100644 --- a/phpmon/Domain/Integrations/Valet/Valet.swift +++ b/phpmon/Domain/Integrations/Valet/Valet.swift @@ -116,15 +116,15 @@ class Valet { installed is not recent enough. */ 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.") self.features.append(.isolatedSites) } - if version.versionCompare("3.0") == .orderedAscending { - self.features.append(.supportForPhp56) - } - if version.versionCompare(Constants.MinimumRecommendedValetVersion) == .orderedAscending { let version = version Log.warn("Valet version \(version!) is too old! (recommended: \(Constants.MinimumRecommendedValetVersion))")