1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2026-03-27 06:20:08 +01:00

♻️ Adjust order of warning checks

This commit is contained in:
2025-11-06 12:00:41 +01:00
parent 865585fced
commit 55a9e5dd5c
2 changed files with 35 additions and 28 deletions

View File

@@ -3920,7 +3920,7 @@
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES; COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1680; CURRENT_PROJECT_VERSION = 1681;
DEAD_CODE_STRIPPING = YES; DEAD_CODE_STRIPPING = YES;
DEBUG = YES; DEBUG = YES;
ENABLE_APP_SANDBOX = NO; ENABLE_APP_SANDBOX = NO;
@@ -3964,7 +3964,7 @@
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES; COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1680; CURRENT_PROJECT_VERSION = 1681;
DEAD_CODE_STRIPPING = YES; DEAD_CODE_STRIPPING = YES;
DEBUG = NO; DEBUG = NO;
ENABLE_APP_SANDBOX = NO; ENABLE_APP_SANDBOX = NO;
@@ -4146,7 +4146,7 @@
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES; COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1680; CURRENT_PROJECT_VERSION = 1681;
DEAD_CODE_STRIPPING = YES; DEAD_CODE_STRIPPING = YES;
DEBUG = YES; DEBUG = YES;
ENABLE_APP_SANDBOX = NO; ENABLE_APP_SANDBOX = NO;
@@ -4339,7 +4339,7 @@
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES; COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1680; CURRENT_PROJECT_VERSION = 1681;
DEAD_CODE_STRIPPING = YES; DEAD_CODE_STRIPPING = YES;
DEBUG = NO; DEBUG = NO;
ENABLE_APP_SANDBOX = NO; ENABLE_APP_SANDBOX = NO;

View File

@@ -12,29 +12,7 @@ extension WarningManager {
// swiftlint:disable function_body_length // swiftlint:disable function_body_length
func allAvailableWarnings() -> [Warning] { func allAvailableWarnings() -> [Warning] {
return [ return [
Warning( // SYSTEM
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()
}
}
}
),
Warning( Warning(
command: { command: {
return await self.container.shell.pipe("sysctl -n sysctl.proc_translated").out return await self.container.shell.pipe("sysctl -n sysctl.proc_translated").out
@@ -96,6 +74,8 @@ extension WarningManager {
} }
} }
), ),
// HOMEBREW
Warning( Warning(
command: { command: {
!BrewDiagnostics.shared.installedTaps.contains("shivammathur/php") !BrewDiagnostics.shared.installedTaps.contains("shivammathur/php")
@@ -128,6 +108,8 @@ extension WarningManager {
await self.checkEnvironment() await self.checkEnvironment()
} }
), ),
// PHP
Warning( Warning(
command: { command: {
PhpConfigChecker.shared.check() PhpConfigChecker.shared.check()
@@ -142,7 +124,32 @@ extension WarningManager {
] }, ] },
url: nil, url: nil,
fix: 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 // swiftlint:enable function_body_length