diff --git a/PHP Monitor.xcodeproj/project.pbxproj b/PHP Monitor.xcodeproj/project.pbxproj index b843a41..37350f4 100644 --- a/PHP Monitor.xcodeproj/project.pbxproj +++ b/PHP Monitor.xcodeproj/project.pbxproj @@ -3655,7 +3655,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1425; + CURRENT_PROJECT_VERSION = 1450; DEAD_CODE_STRIPPING = YES; DEBUG = YES; DEVELOPMENT_TEAM = 8M54J5J787; @@ -3668,7 +3668,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 12.4; - MARKETING_VERSION = 7.0.1; + MARKETING_VERSION = 7.0.2; PRODUCT_BUNDLE_IDENTIFIER = com.nicoverbruggen.phpmon; PRODUCT_MODULE_NAME = PHP_Monitor; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -3686,7 +3686,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1425; + CURRENT_PROJECT_VERSION = 1450; DEAD_CODE_STRIPPING = YES; DEBUG = NO; DEVELOPMENT_TEAM = 8M54J5J787; @@ -3699,7 +3699,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 12.4; - MARKETING_VERSION = 7.0.1; + MARKETING_VERSION = 7.0.2; PRODUCT_BUNDLE_IDENTIFIER = com.nicoverbruggen.phpmon; PRODUCT_MODULE_NAME = PHP_Monitor; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -3927,7 +3927,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1425; + CURRENT_PROJECT_VERSION = 1450; DEAD_CODE_STRIPPING = YES; DEBUG = NO; DEVELOPMENT_TEAM = 8M54J5J787; @@ -3940,7 +3940,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 12.4; - MARKETING_VERSION = 7.0.1; + MARKETING_VERSION = 7.0.2; PRODUCT_BUNDLE_IDENTIFIER = com.nicoverbruggen.phpmon.dev; PRODUCT_MODULE_NAME = PHP_Monitor; PRODUCT_NAME = "$(TARGET_NAME) DEV"; @@ -4044,7 +4044,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1425; + CURRENT_PROJECT_VERSION = 1450; DEAD_CODE_STRIPPING = YES; DEBUG = YES; DEVELOPMENT_TEAM = 8M54J5J787; @@ -4057,7 +4057,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 12.4; - MARKETING_VERSION = 7.0.1; + MARKETING_VERSION = 7.0.2; PRODUCT_BUNDLE_IDENTIFIER = com.nicoverbruggen.phpmon.dev; PRODUCT_MODULE_NAME = PHP_Monitor; PRODUCT_NAME = "$(TARGET_NAME) DEV"; @@ -4161,7 +4161,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1425; + CURRENT_PROJECT_VERSION = 1450; DEAD_CODE_STRIPPING = YES; DEBUG = YES; DEVELOPMENT_TEAM = 8M54J5J787; @@ -4174,7 +4174,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 12.4; - MARKETING_VERSION = 7.0.1; + MARKETING_VERSION = 7.0.2; PRODUCT_BUNDLE_IDENTIFIER = com.nicoverbruggen.phpmon.eap; PRODUCT_MODULE_NAME = PHP_Monitor; PRODUCT_NAME = "$(TARGET_NAME) EAP"; @@ -4343,7 +4343,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1425; + CURRENT_PROJECT_VERSION = 1450; DEAD_CODE_STRIPPING = YES; DEBUG = NO; DEVELOPMENT_TEAM = 8M54J5J787; @@ -4356,7 +4356,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 12.4; - MARKETING_VERSION = 7.0.1; + MARKETING_VERSION = 7.0.2; PRODUCT_BUNDLE_IDENTIFIER = com.nicoverbruggen.phpmon.eap; PRODUCT_MODULE_NAME = PHP_Monitor; PRODUCT_NAME = "$(TARGET_NAME) EAP"; diff --git a/phpmon/Common/PHP/PhpInstallation.swift b/phpmon/Common/PHP/PhpInstallation.swift index db44863..bd5e1ad 100644 --- a/phpmon/Common/PHP/PhpInstallation.swift +++ b/phpmon/Common/PHP/PhpInstallation.swift @@ -22,6 +22,16 @@ class PhpInstallation { return self.iniFiles.flatMap({ $0.extensions }) } + var formulaName: String { + let version = self.versionNumber.short + + if version == PhpEnvironments.brewPhpAlias { + return "php" + } + + return "php@\(self.versionNumber.short)" + } + /** In order to determine details about a PHP installation, we’ll simply run `php-config --version` in the relevant directory. diff --git a/phpmon/Domain/Integrations/Homebrew/BrewPhpFormulaeHandler.swift b/phpmon/Domain/Integrations/Homebrew/BrewPhpFormulaeHandler.swift index ac6a483..80ad729 100644 --- a/phpmon/Domain/Integrations/Homebrew/BrewPhpFormulaeHandler.swift +++ b/phpmon/Domain/Integrations/Homebrew/BrewPhpFormulaeHandler.swift @@ -44,14 +44,13 @@ class BrewPhpFormulaeHandler: HandlesBrewPhpFormulae { } return Brew.phpVersionFormulae.map { (version, formula) in - let fullVersion = PhpEnvironments.shared.cachedPhpInstallations[version]? - .versionNumber.text - + var fullVersion: String? var upgradeVersion: String? - if let version = fullVersion { + if let install = PhpEnvironments.shared.cachedPhpInstallations[version] { + fullVersion = install.versionNumber.text upgradeVersion = outdated?.first(where: { formula in - return formula.installed_versions.contains(version) + return formula.name == install.formulaName })?.current_version } diff --git a/phpmon/Modules/PHP Version Manager/UI/BlockingOverlayView.swift b/phpmon/Modules/PHP Version Manager/UI/BlockingOverlayView.swift index 27c6762..3f59416 100644 --- a/phpmon/Modules/PHP Version Manager/UI/BlockingOverlayView.swift +++ b/phpmon/Modules/PHP Version Manager/UI/BlockingOverlayView.swift @@ -29,7 +29,7 @@ struct BlockingOverlayView: View { var body: some View { ZStack(alignment: .center) { - content().opacity(isBlocking ? 0.2 : 1) + content().opacity(isBlocking ? 0 : 1) if isBlocking { VStack { ActivityIndicator()