diff --git a/PHP Monitor.xcodeproj/project.pbxproj b/PHP Monitor.xcodeproj/project.pbxproj index b1505b63..52cc9f66 100644 --- a/PHP Monitor.xcodeproj/project.pbxproj +++ b/PHP Monitor.xcodeproj/project.pbxproj @@ -3920,7 +3920,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1680; + CURRENT_PROJECT_VERSION = 1681; DEAD_CODE_STRIPPING = YES; DEBUG = YES; ENABLE_APP_SANDBOX = NO; @@ -3964,7 +3964,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1680; + CURRENT_PROJECT_VERSION = 1681; DEAD_CODE_STRIPPING = YES; DEBUG = NO; ENABLE_APP_SANDBOX = NO; @@ -4146,7 +4146,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1680; + CURRENT_PROJECT_VERSION = 1681; DEAD_CODE_STRIPPING = YES; DEBUG = YES; ENABLE_APP_SANDBOX = NO; @@ -4339,7 +4339,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1680; + CURRENT_PROJECT_VERSION = 1681; DEAD_CODE_STRIPPING = YES; DEBUG = NO; ENABLE_APP_SANDBOX = NO; diff --git a/phpmon/Modules/PHP Doctor/Data/WarningManager+Evaluations.swift b/phpmon/Modules/PHP Doctor/Data/WarningManager+Evaluations.swift index 67a32145..4d1d742e 100644 --- a/phpmon/Modules/PHP Doctor/Data/WarningManager+Evaluations.swift +++ b/phpmon/Modules/PHP Doctor/Data/WarningManager+Evaluations.swift @@ -12,29 +12,7 @@ extension WarningManager { // swiftlint:disable function_body_length func allAvailableWarnings() -> [Warning] { return [ - Warning( - command: { - if Valet.installed { - return !Valet.getExpiredDomainListable().isEmpty - } - - return false - }, - name: "One or more domain certificates expired", - title: "warnings.certificates_expired.title", - paragraphs: { return ["warnings.certificates_expired.description"] }, - url: nil, - fix: { - await DomainListVC.show() - - if let vc = await App.shared.domainListWindowController? - .window?.contentViewController as? DomainListVC { - await vc.checkForCertificateRenewal { - await self.checkEnvironment() - } - } - } - ), + // SYSTEM Warning( command: { return await self.container.shell.pipe("sysctl -n sysctl.proc_translated").out @@ -96,6 +74,8 @@ extension WarningManager { } } ), + + // HOMEBREW Warning( command: { !BrewDiagnostics.shared.installedTaps.contains("shivammathur/php") @@ -128,6 +108,8 @@ extension WarningManager { await self.checkEnvironment() } ), + + // PHP Warning( command: { PhpConfigChecker.shared.check() @@ -142,7 +124,32 @@ extension WarningManager { ] }, url: nil, fix: nil - ) + ), + + // VALET + Warning( + command: { + if Valet.installed { + return !Valet.getExpiredDomainListable().isEmpty + } + + return false + }, + name: "One or more domain certificates expired", + title: "warnings.certificates_expired.title", + paragraphs: { return ["warnings.certificates_expired.description"] }, + url: nil, + fix: { + await DomainListVC.show() + + if let vc = await App.shared.domainListWindowController? + .window?.contentViewController as? DomainListVC { + await vc.checkForCertificateRenewal { + await self.checkEnvironment() + } + } + } + ), ] } // swiftlint:enable function_body_length