From 68fa8e523e57567691f36083e21997168db78302 Mon Sep 17 00:00:00 2001 From: Nico Verbruggen Date: Thu, 3 Mar 2022 14:49:33 +0100 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=91=8C=20Fix=20string=20that=20made?= =?UTF-8?q?=20it=20into=205.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- phpmon/Localizable.strings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpmon/Localizable.strings b/phpmon/Localizable.strings index 4242695f..ba4dd2ec 100644 --- a/phpmon/Localizable.strings +++ b/phpmon/Localizable.strings @@ -240,7 +240,7 @@ problem manually, using your own Terminal app (this just shows you the output)." "alert.fix_homebrew_permissions_done.title" = "All file and folder permissions for Valet's dependencies have been restored."; "alert.fix_homebrew_permissions_done.subtitle" = "Because of this, all of Valet's services are currently no longer running. You can now interact with Homebrew, but your Valet sites will be unavailable as all services are disabled."; -"alert.fix_homebrew_permissions_done.desc" = "When you are done with Homebrew (after running `brew upgrade`, for example, you should restart PHP Monitor and select \"Restart All Services\" if you want Valet to work again. It is always recommended to restart PHP Monitor whenever you upgrade PHP versions with `brew upgrade`, or things might break."; +"alert.fix_homebrew_permissions_done.desc" = "When you are done with Homebrew (after running `brew upgrade`, for example) you should restart PHP Monitor and select \"Restart All Services\" if you want Valet to work again. It is always recommended to restart PHP Monitor whenever you upgrade PHP versions with `brew upgrade`, or things might break."; // PHP FPM Broken "alert.php_fpm_broken.title" = "PHP-FPM configuration is incorrect"; From 3b297e07dc0ee96045d91439674373e5f8fe85e4 Mon Sep 17 00:00:00 2001 From: Nico Verbruggen Date: Wed, 9 Mar 2022 16:19:41 +0100 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=90=9B=20Adjust=20the=20order=20of=20?= =?UTF-8?q?startup=20checks=20(#146)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PHP Monitor.xcodeproj/project.pbxproj | 4 ++-- phpmon/Domain/App/Startup.swift | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/PHP Monitor.xcodeproj/project.pbxproj b/PHP Monitor.xcodeproj/project.pbxproj index 11ebe824..6bec8b33 100644 --- a/PHP Monitor.xcodeproj/project.pbxproj +++ b/PHP Monitor.xcodeproj/project.pbxproj @@ -1207,7 +1207,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 715; + CURRENT_PROJECT_VERSION = 717; DEBUG = YES; DEVELOPMENT_TEAM = 8M54J5J787; ENABLE_HARDENED_RUNTIME = YES; @@ -1233,7 +1233,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 715; + CURRENT_PROJECT_VERSION = 717; DEBUG = NO; DEVELOPMENT_TEAM = 8M54J5J787; ENABLE_HARDENED_RUNTIME = YES; diff --git a/phpmon/Domain/App/Startup.swift b/phpmon/Domain/App/Startup.swift index c540f413..f2d805fd 100644 --- a/phpmon/Domain/App/Startup.swift +++ b/phpmon/Domain/App/Startup.swift @@ -127,13 +127,6 @@ class Startup { Paths.valet ) ), - EnvironmentCheck( - command: { return HomebrewDiagnostics.cannotLoadService() }, - name: "`sudo \(Paths.brew) services info` JSON loaded", - titleText: "startup.errors.services_json_error.title".localized, - subtitleText: "startup.errors.services_json_error.subtitle".localized, - descriptionText: "startup.errors.services_json_error.desc".localized - ), EnvironmentCheck( command: { return !Shell.pipe("cat /private/etc/sudoers.d/brew").contains(Paths.brew) }, name: "`/private/etc/sudoers.d/brew` contains brew", @@ -146,6 +139,13 @@ class Startup { titleText: "startup.errors.sudoers_valet.title".localized, subtitleText: "startup.errors.sudoers_valet.subtitle".localized ), + EnvironmentCheck( + command: { return HomebrewDiagnostics.cannotLoadService() }, + name: "`sudo \(Paths.brew) services info` JSON loaded", + titleText: "startup.errors.services_json_error.title".localized, + subtitleText: "startup.errors.services_json_error.subtitle".localized, + descriptionText: "startup.errors.services_json_error.desc".localized + ), EnvironmentCheck( command: { // Determine the Valet version only AFTER confirming the correct permission is in place From 06a80222653c811409cbd157802afb99828331cc Mon Sep 17 00:00:00 2001 From: Nico Verbruggen Date: Wed, 9 Mar 2022 16:41:47 +0100 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=93=9D=20Annotate=20environment=20che?= =?UTF-8?q?cks=20(#146)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- phpmon/Domain/App/Startup.swift | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/phpmon/Domain/App/Startup.swift b/phpmon/Domain/App/Startup.swift index f2d805fd..d55b6f82 100644 --- a/phpmon/Domain/App/Startup.swift +++ b/phpmon/Domain/App/Startup.swift @@ -85,6 +85,9 @@ class Startup { // MARK: - Check (List) public var checks: [EnvironmentCheck] = [ + // ================================================================================= + // The Homebrew binary must exist. + // ================================================================================= EnvironmentCheck( command: { return !FileManager.default.fileExists(atPath: Paths.brew) }, name: "`\(Paths.brew)` exists", @@ -99,6 +102,9 @@ class Startup { buttonText: "alert.homebrew_missing.quit".localized, requiresAppRestart: true ), + // ================================================================================= + // The PHP binary must exist. + // ================================================================================= EnvironmentCheck( command: { return !Filesystem.fileExists(Paths.php) }, name: "`\(Paths.php)` exists", @@ -106,6 +112,9 @@ class Startup { subtitleText: "startup.errors.php_binary.subtitle".localized, descriptionText: "startup.errors.php_binary.desc".localized(Paths.php) ), + // ================================================================================= + // Make sure we can detect one or more PHP installations. + // ================================================================================= EnvironmentCheck( command: { return !Shell.pipe("ls \(Paths.optPath) | grep php").contains("php") }, name: "`ls \(Paths.optPath) | grep php` returned php result", @@ -115,10 +124,12 @@ class Startup { ), descriptionText: "startup.errors.php_opt.desc".localized ), + // ================================================================================= + // The Valet binary must exist. + // ================================================================================= EnvironmentCheck( command: { - return !(Filesystem.fileExists(Paths.valet) - || Filesystem.fileExists("~/.composer/vendor/bin/valet")) + return !(Filesystem.fileExists(Paths.valet) || Filesystem.fileExists("~/.composer/vendor/bin/valet")) }, name: "`valet` binary exists", titleText: "startup.errors.valet_executable.title".localized, @@ -127,6 +138,11 @@ class Startup { Paths.valet ) ), + // ================================================================================= + // Check if Valet and Homebrew need manual password intervention. If they do, then + // PHP Monitor will be unable to run these commands, which prevents PHP Monitor from + // functioning correctly. Let the user know that they need to run `valet trust`. + // ================================================================================= EnvironmentCheck( command: { return !Shell.pipe("cat /private/etc/sudoers.d/brew").contains(Paths.brew) }, name: "`/private/etc/sudoers.d/brew` contains brew", @@ -139,6 +155,9 @@ class Startup { titleText: "startup.errors.sudoers_valet.title".localized, subtitleText: "startup.errors.sudoers_valet.subtitle".localized ), + // ================================================================================= + // Verify if the Homebrew services are running (as root). + // ================================================================================= EnvironmentCheck( command: { return HomebrewDiagnostics.cannotLoadService() }, name: "`sudo \(Paths.brew) services info` JSON loaded", @@ -146,10 +165,11 @@ class Startup { subtitleText: "startup.errors.services_json_error.subtitle".localized, descriptionText: "startup.errors.services_json_error.desc".localized ), + // ================================================================================= + // Determine the Valet version and ensure it isn't unknown. + // ================================================================================= EnvironmentCheck( command: { - // Determine the Valet version only AFTER confirming the correct permission is in place - // or otherwise this command will never return a valid version number Valet.shared.version = VersionExtractor.from(valet("--version", sudo: false)) return Valet.shared.version == nil }, From ba4ed3b36535002757fa1dd162e946fdb6423cf8 Mon Sep 17 00:00:00 2001 From: Nico Verbruggen Date: Wed, 9 Mar 2022 17:51:19 +0100 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=94=A7=20Prepare=20for=20maintenance?= =?UTF-8?q?=20release?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PHP Monitor.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PHP Monitor.xcodeproj/project.pbxproj b/PHP Monitor.xcodeproj/project.pbxproj index 6bec8b33..1c85abb3 100644 --- a/PHP Monitor.xcodeproj/project.pbxproj +++ b/PHP Monitor.xcodeproj/project.pbxproj @@ -1217,7 +1217,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 11.0; - MARKETING_VERSION = 5.1; + MARKETING_VERSION = 5.1.1; PRODUCT_BUNDLE_IDENTIFIER = com.nicoverbruggen.phpmon; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1243,7 +1243,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 11.0; - MARKETING_VERSION = 5.1; + MARKETING_VERSION = 5.1.1; PRODUCT_BUNDLE_IDENTIFIER = com.nicoverbruggen.phpmon; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = "";