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

Compare commits

...

22 Commits

Author SHA1 Message Date
efd902b4f3 🚀 Version 5.6.4 2022-11-18 18:39:00 +01:00
918e272da7 🔧 Bump build 2022-11-18 18:37:31 +01:00
272a9182d3 🔥 Remove reference to LatestStablePhpVersion 2022-11-18 18:37:20 +01:00
63f85aff91 🐛 Fix issue when using services quick toggle 2022-11-18 18:32:38 +01:00
581c2d1974 📝 Update supported PHP versions in README 2022-11-07 20:45:58 +01:00
4deef64537 📝 Update SECURITY.md 2022-11-02 21:08:57 +01:00
bedabaa3bb 👌 PHP 8.2 release, PHP 8.3-dev support 2022-11-02 21:06:36 +01:00
9da3772212 🚀 Version 5.6.3 2022-10-22 17:34:53 +02:00
e62b03d070 👌 Style fix 2022-10-22 16:43:05 +02:00
9a11d2efed 🔧 Bump build 2022-10-22 16:42:26 +02:00
b134e62328 🐛 Handle empty output for brew info 2022-10-22 16:41:54 +02:00
5c69133c42 👌 Add brew tap homebrew/services instruction
This now recommends the appropriate solution for #208.
2022-10-20 20:44:44 +02:00
f4448e0640 🔧 Bump version number 2022-10-10 21:49:51 +02:00
7fd30d7c54 Add preference to disable TLD alert (#206) 2022-10-10 21:49:43 +02:00
2c57dea97f 🔀 Merge branch 'main' into dev/5.6 2022-10-09 22:00:36 +02:00
a77fa5557a 📝 Update README for Login Items on Ventura 2022-10-09 21:56:13 +02:00
45704fc736 🚀 Version 5.6.2 2022-10-02 13:28:58 +02:00
f28354e634 🐛 Use valet secure sitename (#197) 2022-10-02 13:28:01 +02:00
8055a32bde 🐛 Fix ComposerWindow deinit not firing 2022-09-29 18:50:40 +02:00
5b3054326e 🔧 Bump version number 2022-09-28 18:24:26 +02:00
e7f3c7e59c 🐛 Fix an issue with missing separator item 2022-09-28 18:24:01 +02:00
a407515534 🚀 Version 5.6.1 2022-09-24 12:56:14 +02:00
21 changed files with 65 additions and 37 deletions

View File

@ -1741,7 +1741,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 973;
CURRENT_PROJECT_VERSION = 985;
DEAD_CODE_STRIPPING = YES;
DEBUG = YES;
DEVELOPMENT_TEAM = 8M54J5J787;
@ -1752,7 +1752,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 5.6.1;
MARKETING_VERSION = 5.6.4;
PRODUCT_BUNDLE_IDENTIFIER = com.nicoverbruggen.phpmon;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -1769,7 +1769,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 973;
CURRENT_PROJECT_VERSION = 985;
DEAD_CODE_STRIPPING = YES;
DEBUG = NO;
DEVELOPMENT_TEAM = 8M54J5J787;
@ -1780,7 +1780,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 5.6.1;
MARKETING_VERSION = 5.6.4;
PRODUCT_BUNDLE_IDENTIFIER = com.nicoverbruggen.phpmon;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";

View File

@ -88,7 +88,8 @@ If you're still having issues, here's a few common questions & answers, as well
<li>PHP 7.4</li>
<li>PHP 8.0</li>
<li>PHP 8.1</li>
<li>PHP 8.2 (experimental)</li>
<li>PHP 8.2</li>
<li>PHP 8.3 (experimental)</li>
</ul>
For more details, consult the [constants file](https://github.com/nicoverbruggen/phpmon/blob/main/phpmon/Common/Core/Constants.swift#L16) file to see which versions are supported.
@ -98,7 +99,9 @@ For more details, consult the [constants file](https://github.com/nicoverbruggen
<details>
<summary><strong>I want PHP Monitor to start up when I boot my Mac!</strong></summary>
You can do this by dragging *PHP Monitor.app* into the **Login Items** section in **System Preferences > Users & Groups** for your account.
On macOS Ventura, you can accomplish this by going to **System Settings > General > Login Items** and adding PHP Monitor.app to the list **Open at Login**. You can do this with any application, by the way.
On older versions of macOS, you can do this by dragging *PHP Monitor.app* into the **Login Items** section in **System Preferences > Users & Groups** for your account.
Super convenient!
</details>

View File

@ -6,9 +6,7 @@ Generally speaking, only the latest version of **PHP Monitor** is supported, exc
| Version | Apple Silicon | Supported | Supported macOS | Deployment Target | Detected PHP Versions | Recommended Valet Version |
| ------- | ------------- | ------------------ | ----- | ----- | ----- | ----
| 5.x | ✅ Universal binary | ✅ Yes | Big Sur (11.0)<br/>Monterey (12.0)<br/>Ventura (13.0)* | macOS 11+ | PHP 5.6—PHP 8.2 (w/ Valet 2.x)<br/>PHP 7.0—PHP 8.2 (w/ Valet 3.x) | 3.0 recommended<br/> 2.16.2 minimum |
_(*) macOS Ventura (13.0) is not officially supported until it officially releases._
| 5.x | ✅ Universal binary | ✅ Yes | Big Sur (11.0)<br/>Monterey (12.0)<br/>Ventura (13.0) | macOS 11+ | PHP 5.6—PHP 8.2 (w/ Valet 2.x)<br/>PHP 7.0—PHP 8.2 (w/ Valet 3.x) | 3.0 recommended<br/> 2.16.2 minimum |
## Legacy versions

View File

@ -9,12 +9,6 @@ import Cocoa
struct Constants {
/**
* The latest PHP version that is considered to be stable at the time of release.
* This version number is currently not used (only as a default fallback).
*/
static let LatestStablePhpVersion = "8.1"
/**
The minimum version of Valet that is recommended.
If the installed version is older, a notification will be shown
@ -42,13 +36,14 @@ struct Constants {
"7.4",
"8.0",
"8.1",
"8.2",
// ====================
// EXPERIMENTAL SUPPORT
// ====================
// Every release that supports the next release will always support the next
// dev release. In this case, that means that the version below is detected.
"8.2"
"8.3"
]
struct Urls {

View File

@ -30,7 +30,7 @@ class PMWindowController: NSWindowController, NSWindowDelegate {
}
deinit {
Log.perf("Window controller '\(windowName)' was deinitialized")
Log.perf("deinit: \(String(describing: self)).\(#function)")
}
}

View File

@ -65,7 +65,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele
override init() {
logger.verbosity = .info
#if DEBUG
// logger.verbosity = .performance
logger.verbosity = .performance
#endif
if CommandLine.arguments.contains("--v") {
logger.verbosity = .performance

View File

@ -39,9 +39,7 @@ class ServicesManager: ObservableObject {
}
}
guard let userServiceNames = Preferences.custom.services else {
return
}
let userServiceNames = Preferences.custom.services ?? []
DispatchQueue.global(qos: .background).async {
let data = Shell

View File

@ -47,7 +47,7 @@ extension DomainListVC {
let originalSecureStatus = selectedSite!.secured
let action = selectedSite!.secured ? "unsecure" : "secure"
let selectedSite = selectedSite!
let command = "cd '\(selectedSite.absolutePath)' && sudo \(Paths.valet) \(action) && exit;"
let command = "sudo \(Paths.valet) \(action) '\(selectedSite.name)' && exit;"
waitAndExecute {
Shell.run(command, requiresPath: true)

View File

@ -292,6 +292,6 @@ class DomainListVC: NSViewController, NSTableViewDelegate, NSTableViewDataSource
// MARK: - Deinitialization
deinit {
Log.perf("DomainListVC deallocated")
Log.perf("deinit: \(String(describing: self)).\(#function)")
}
}

View File

@ -52,15 +52,15 @@ class ComposerWindow {
}
task.listen(
didReceiveStandardOutputData: { string in
didReceiveStandardOutputData: { [weak self] string in
DispatchQueue.main.async {
self.window?.addToConsole(string)
self?.window?.addToConsole(string)
}
// Log.perf("\(string.trimmingCharacters(in: .newlines))")
},
didReceiveStandardErrorData: { string in
didReceiveStandardErrorData: { [weak self] string in
DispatchQueue.main.async {
self.window?.addToConsole(string)
self?.window?.addToConsole(string)
}
// Log.perf("\(string.trimmingCharacters(in: .newlines))")
}
@ -91,6 +91,7 @@ class ComposerWindow {
}
window = nil
removeBusyStatus()
menu = nil
completion(true)
}
}
@ -103,6 +104,7 @@ class ComposerWindow {
window?.progressView?.labelDescription.stringValue = "alert.composer_failure.info".localized
window = nil
removeBusyStatus()
menu = nil
completion(false)
}
}
@ -128,4 +130,8 @@ class ComposerWindow {
.withPrimary(text: "OK")
.show()
}
deinit {
Log.perf("deinit: \(String(describing: self)).\(#function)")
}
}

View File

@ -77,7 +77,7 @@ class HomebrewDiagnostics {
private static func hasAliasConflict() -> Bool {
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")
return false
} else {

View File

@ -78,13 +78,19 @@ class Valet {
Notify the user about a non-default TLD being set.
*/
public static func notifyAboutUnsupportedTLD() {
if Valet.shared.config.tld != "test" {
if Valet.shared.config.tld != "test" && Preferences.isEnabled(.warnAboutNonStandardTLD) {
DispatchQueue.main.async {
BetterAlert().withInformation(
title: "alert.warnings.tld_issue.title".localized,
subtitle: "alert.warnings.tld_issue.subtitle".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

@ -212,6 +212,7 @@ extension StatusMenu {
func addXdebugMenuItem() {
if !Xdebug.enabled {
addItem(NSMenuItem.separator())
return
}

View File

@ -47,7 +47,7 @@ class BetterAlertVC: NSViewController {
}
deinit {
Log.perf("A BetterAlert has been deinitialized.")
Log.perf("deinit: \(String(describing: self)).\(#function)")
}
// MARK: Outlet Actions

View File

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

View File

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

View File

@ -25,7 +25,7 @@ class GenericPreferenceVC: NSViewController {
// MARK: - Deinitialization
deinit {
Log.perf("PrefsVC deallocated")
Log.perf("deinit: \(String(describing: self)).\(#function)")
}
func getDynamicIconPV() -> NSView {
@ -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(
_ localizationKey: String,
_ preference: PreferenceName,
@ -249,7 +259,8 @@ class NotificationPreferencesVC: GenericPreferenceVC {
vc.getNotifyAboutSecureTogglePV(),
vc.getNotifyAboutGlobalComposerStatusPV(),
vc.getNotifyAboutServicesPV(),
vc.getNotifyAboutPhpFpmChangePV()
vc.getNotifyAboutPhpFpmChangePV(),
vc.getWarnAboutNonStandardTLD()
]
return vc

View File

@ -18,7 +18,7 @@ class ProgressViewController: NSViewController {
@IBOutlet weak var imageViewType: NSImageView!
deinit {
Log.perf("Deinitializing ProgressViewController")
Log.perf("deinit: \(String(describing: self)).\(#function)")
}
}

View File

@ -56,7 +56,7 @@ class TerminalProgressWindowController: NSWindowController, NSWindowDelegate {
}
deinit {
Log.perf("Deinitializing ProgressWindowController")
Log.perf("deinit: \(String(describing: self)).\(#function)")
}
}

View File

@ -68,7 +68,7 @@ class PhpConfigWatcher {
}
deinit {
Log.perf("A PhpConfigWatcher has been deinitialized.")
Log.perf("deinit: \(String(describing: self)).\(#function)")
}
}

View File

@ -227,6 +227,7 @@
"prefs.integrations" = "Integrations:";
"prefs.updates" = "Updates:";
"prefs.notifications" = "Notifications:";
"prefs.warnings" = "Warnings:";
"prefs.menu_contents" = "Features in Menu:";
"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" = "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" = "PHP Switcher";
@ -504,7 +508,7 @@ If you are seeing this message but are confused why this folder has gone missing
/// Cannot retrieve services
"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.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
"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.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.do_not_tell_again" = "Don't Tell Me Again";
// WARNINGS