diff --git a/PHP Monitor.xcodeproj/project.pbxproj b/PHP Monitor.xcodeproj/project.pbxproj index 1c85abb..5002ac6 100644 --- a/PHP Monitor.xcodeproj/project.pbxproj +++ b/PHP Monitor.xcodeproj/project.pbxproj @@ -1207,7 +1207,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 717; + CURRENT_PROJECT_VERSION = 720; DEBUG = YES; DEVELOPMENT_TEAM = 8M54J5J787; ENABLE_HARDENED_RUNTIME = YES; @@ -1217,7 +1217,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 11.0; - MARKETING_VERSION = 5.1.1; + MARKETING_VERSION = 5.2; PRODUCT_BUNDLE_IDENTIFIER = com.nicoverbruggen.phpmon; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1233,7 +1233,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 717; + CURRENT_PROJECT_VERSION = 720; DEBUG = NO; DEVELOPMENT_TEAM = 8M54J5J787; ENABLE_HARDENED_RUNTIME = YES; @@ -1243,7 +1243,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 11.0; - MARKETING_VERSION = 5.1.1; + MARKETING_VERSION = 5.2; PRODUCT_BUNDLE_IDENTIFIER = com.nicoverbruggen.phpmon; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/phpmon/Domain/Integrations/Valet/Valet.swift b/phpmon/Domain/Integrations/Valet/Valet.swift index ab561a6..02ae679 100644 --- a/phpmon/Domain/Integrations/Valet/Valet.swift +++ b/phpmon/Domain/Integrations/Valet/Valet.swift @@ -10,6 +10,10 @@ import Foundation class Valet { + enum FeatureFlag { + case isolatedSites + } + static let shared = Valet() /// The version of Valet that was detected. @@ -24,6 +28,9 @@ class Valet { /// Whether we're busy with some blocking operation. var isBusy: Bool = false + /// Various feature flags. Enabled based on the installed Valet version. + var features: [FeatureFlag] = [] + /// When initialising the Valet singleton assume no sites loaded. We will load the version later. init() { self.version = nil @@ -85,6 +92,8 @@ class Valet { public func validateVersion() -> Void { if version.versionCompare("3.0") == .orderedAscending { Log.warn("This version of Valet does not support isolation yet. Disabling isolation checks.") + } else { + self.features.append(FeatureFlag.isolatedSites) } if version.versionCompare(Constants.MinimumRecommendedValetVersion) == .orderedAscending {