1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2025-12-21 19:20:06 +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_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;

View File

@@ -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