1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2025-08-08 04:20:07 +02:00

🚀 Version 5.6.3

This commit is contained in:
2022-10-22 17:34:30 +02:00
7 changed files with 36 additions and 9 deletions

View File

@ -1741,7 +1741,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 = 976; CURRENT_PROJECT_VERSION = 980;
DEAD_CODE_STRIPPING = YES; DEAD_CODE_STRIPPING = YES;
DEBUG = YES; DEBUG = YES;
DEVELOPMENT_TEAM = 8M54J5J787; DEVELOPMENT_TEAM = 8M54J5J787;
@ -1752,7 +1752,7 @@
"@executable_path/../Frameworks", "@executable_path/../Frameworks",
); );
MACOSX_DEPLOYMENT_TARGET = 11.0; MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 5.6.2; MARKETING_VERSION = 5.6.3;
PRODUCT_BUNDLE_IDENTIFIER = com.nicoverbruggen.phpmon; PRODUCT_BUNDLE_IDENTIFIER = com.nicoverbruggen.phpmon;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
@ -1769,7 +1769,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 = 976; CURRENT_PROJECT_VERSION = 980;
DEAD_CODE_STRIPPING = YES; DEAD_CODE_STRIPPING = YES;
DEBUG = NO; DEBUG = NO;
DEVELOPMENT_TEAM = 8M54J5J787; DEVELOPMENT_TEAM = 8M54J5J787;
@ -1780,7 +1780,7 @@
"@executable_path/../Frameworks", "@executable_path/../Frameworks",
); );
MACOSX_DEPLOYMENT_TARGET = 11.0; MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 5.6.2; MARKETING_VERSION = 5.6.3;
PRODUCT_BUNDLE_IDENTIFIER = com.nicoverbruggen.phpmon; PRODUCT_BUNDLE_IDENTIFIER = com.nicoverbruggen.phpmon;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";

View File

@ -77,7 +77,7 @@ class HomebrewDiagnostics {
private static func hasAliasConflict() -> Bool { private static func hasAliasConflict() -> Bool {
let tapAlias = Shell.pipe("\(Paths.brew) info shivammathur/php/php --json") let tapAlias = Shell.pipe("\(Paths.brew) info shivammathur/php/php --json")
if tapAlias.contains("brew tap shivammathur/php") || tapAlias.contains("Error") { if tapAlias.contains("brew tap shivammathur/php") || tapAlias.contains("Error") || tapAlias.isEmpty {
Log.info("The user does not appear to have tapped: shivammathur/php") Log.info("The user does not appear to have tapped: shivammathur/php")
return false return false
} else { } else {

View File

@ -78,13 +78,19 @@ class Valet {
Notify the user about a non-default TLD being set. Notify the user about a non-default TLD being set.
*/ */
public static func notifyAboutUnsupportedTLD() { public static func notifyAboutUnsupportedTLD() {
if Valet.shared.config.tld != "test" { if Valet.shared.config.tld != "test" && Preferences.isEnabled(.warnAboutNonStandardTLD) {
DispatchQueue.main.async { DispatchQueue.main.async {
BetterAlert().withInformation( BetterAlert().withInformation(
title: "alert.warnings.tld_issue.title".localized, title: "alert.warnings.tld_issue.title".localized,
subtitle: "alert.warnings.tld_issue.subtitle".localized, subtitle: "alert.warnings.tld_issue.subtitle".localized,
description: "alert.warnings.tld_issue.description".localized description: "alert.warnings.tld_issue.description".localized
).withPrimary(text: "OK").show() )
.withPrimary(text: "OK")
.withTertiary(text: "alert.do_not_tell_again".localized, action: { alert in
Preferences.update(.warnAboutNonStandardTLD, value: false)
alert.close(with: .alertThirdButtonReturn)
})
.show()
} }
} }
} }

View File

@ -26,6 +26,9 @@ enum PreferenceName: String {
case iconTypeToDisplay = "icon_type_to_display" case iconTypeToDisplay = "icon_type_to_display"
case fullPhpVersionDynamicIcon = "full_php_in_menu_bar" case fullPhpVersionDynamicIcon = "full_php_in_menu_bar"
// WARNINGS
case warnAboutNonStandardTLD = "warn_about_non_standard_tld"
// NOTIFICATIONS // NOTIFICATIONS
case notifyAboutVersionChange = "notify_about_version_change" case notifyAboutVersionChange = "notify_about_version_change"
case notifyAboutPhpFpmRestart = "notify_about_php_fpm_restart" case notifyAboutPhpFpmRestart = "notify_about_php_fpm_restart"
@ -60,6 +63,7 @@ enum PreferenceName: String {
.showPhpDoctorSuggestions, .showPhpDoctorSuggestions,
// Notifications // Notifications
.warnAboutNonStandardTLD,
.notifyAboutVersionChange, .notifyAboutVersionChange,
.notifyAboutPhpFpmRestart, .notifyAboutPhpFpmRestart,
.notifyAboutServices, .notifyAboutServices,

View File

@ -57,6 +57,7 @@ class Preferences {
PreferenceName.fullPhpVersionDynamicIcon.rawValue: false, PreferenceName.fullPhpVersionDynamicIcon.rawValue: false,
/// Preferences: Notifications /// Preferences: Notifications
PreferenceName.warnAboutNonStandardTLD.rawValue: true,
PreferenceName.notifyAboutVersionChange.rawValue: true, PreferenceName.notifyAboutVersionChange.rawValue: true,
PreferenceName.notifyAboutPhpFpmRestart.rawValue: true, PreferenceName.notifyAboutPhpFpmRestart.rawValue: true,
PreferenceName.notifyAboutServices.rawValue: true, PreferenceName.notifyAboutServices.rawValue: true,

View File

@ -188,6 +188,16 @@ class GenericPreferenceVC: NSViewController {
) )
} }
func getWarnAboutNonStandardTLD() -> NSView {
return CheckboxPreferenceView.make(
sectionText: "prefs.warnings".localized,
descriptionText: "prefs.warn_about_non_standard_tld_desc".localized,
checkboxText: "prefs.warn_about_non_standard_tld".localized,
preference: .warnAboutNonStandardTLD,
action: {}
)
}
func getDisplayMenuSectionPV( func getDisplayMenuSectionPV(
_ localizationKey: String, _ localizationKey: String,
_ preference: PreferenceName, _ preference: PreferenceName,
@ -249,7 +259,8 @@ class NotificationPreferencesVC: GenericPreferenceVC {
vc.getNotifyAboutSecureTogglePV(), vc.getNotifyAboutSecureTogglePV(),
vc.getNotifyAboutGlobalComposerStatusPV(), vc.getNotifyAboutGlobalComposerStatusPV(),
vc.getNotifyAboutServicesPV(), vc.getNotifyAboutServicesPV(),
vc.getNotifyAboutPhpFpmChangePV() vc.getNotifyAboutPhpFpmChangePV(),
vc.getWarnAboutNonStandardTLD()
] ]
return vc return vc

View File

@ -227,6 +227,7 @@
"prefs.integrations" = "Integrations:"; "prefs.integrations" = "Integrations:";
"prefs.updates" = "Updates:"; "prefs.updates" = "Updates:";
"prefs.notifications" = "Notifications:"; "prefs.notifications" = "Notifications:";
"prefs.warnings" = "Warnings:";
"prefs.menu_contents" = "Features in Menu:"; "prefs.menu_contents" = "Features in Menu:";
"prefs.icon_options.php" = "Display PHP Icon"; "prefs.icon_options.php" = "Display PHP Icon";
@ -279,6 +280,9 @@
"prefs.notify_about_composer_success_desc" = "Displays a notification when the global Composer configuration was successfully updated."; "prefs.notify_about_composer_success_desc" = "Displays a notification when the global Composer configuration was successfully updated.";
"prefs.notify_about_composer_success" = "Notify about global composer update"; "prefs.notify_about_composer_success" = "Notify about global composer update";
"prefs.warn_about_non_standard_tld_desc" = "If you use a non-standard TLD, you may not wish to get repeated notifications about this.";
"prefs.warn_about_non_standard_tld" = "Warn about non-standard TLD";
"prefs.display_global_version_switcher_desc" = "If disabled, you will not be able to change the globally linked PHP version via the main menu."; "prefs.display_global_version_switcher_desc" = "If disabled, you will not be able to change the globally linked PHP version via the main menu.";
"prefs.display_global_version_switcher" = "PHP Switcher"; "prefs.display_global_version_switcher" = "PHP Switcher";
@ -504,7 +508,7 @@ If you are seeing this message but are confused why this folder has gone missing
/// Cannot retrieve services /// Cannot retrieve services
"startup.errors.services_json_error.title" = "Cannot determine services status"; "startup.errors.services_json_error.title" = "Cannot determine services status";
"startup.errors.services_json_error.subtitle" = "PHP Monitor usually queries `brew` using the following command to test if the services can be retrieved: `sudo brew services info nginx --json`.\n\nPHP Monitor could not interpret this response."; "startup.errors.services_json_error.subtitle" = "PHP Monitor usually queries `brew` using the following command to test if the services can be retrieved: `sudo brew services info nginx --json`.\n\nPHP Monitor could not interpret this response.";
"startup.errors.services_json_error.desc" = "This can happen if your Homebrew installation is out of date, in which case Homebrew won't return JSON yet. You can usually fix this by running `brew update`. You can also try running `sudo brew services info nginx --json` in your terminal of choice."; "startup.errors.services_json_error.desc" = "This can happen if your Homebrew installation is out of date, in which case Homebrew won't return JSON yet. You can usually fix this by running `brew update` or `brew tap homebrew/services`. You can also try running `sudo brew services info nginx --json` in your terminal of choice.";
/// Issue with `which` alias /// Issue with `which` alias
"startup.errors.which_alias_issue.title" = "A configuration issue was detected"; "startup.errors.which_alias_issue.title" = "A configuration issue was detected";
@ -548,6 +552,7 @@ If you are seeing this message but are confused why this folder has gone missing
"alert.warnings.tld_issue.title" = "You are not using `.test` as the TLD for Valet."; "alert.warnings.tld_issue.title" = "You are not using `.test` as the TLD for Valet.";
"alert.warnings.tld_issue.subtitle" = "Using a non-default TLD may not work correctly and is not officially supported."; "alert.warnings.tld_issue.subtitle" = "Using a non-default TLD may not work correctly and is not officially supported.";
"alert.warnings.tld_issue.description" = "PHP Monitor will remain functional, but there might be issues: the app might not correctly show which domains have been secured. For optimal results, go to your Valet configuration file (config.json in the Valet directory) and change the TLD back to `test`."; "alert.warnings.tld_issue.description" = "PHP Monitor will remain functional, but there might be issues: the app might not correctly show which domains have been secured. For optimal results, go to your Valet configuration file (config.json in the Valet directory) and change the TLD back to `test`.";
"alert.do_not_tell_again" = "Don't Tell Me Again";
// WARNINGS // WARNINGS