From f1fe42e56342ce2438709affebf6ffc27c9cba86 Mon Sep 17 00:00:00 2001 From: Nico Verbruggen Date: Fri, 15 Nov 2024 15:22:53 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Updated=20constants=20for=20PHP=208?= =?UTF-8?q?.4=20&=208.5=20support?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thankfully, these changes are simple. Before releasing, I will be testing the new build, though. Here's what constants I changed, and why: - Homebrew PHP formulae are now consistently sourced from the `shivammathur/php` tap. This should make the transition to new PHP releases a little bit easier, but I need to verify this works without issues before publishing this update. - Bumped the PHP formulae cutoff date to Nov 30, 2025. At this point, PHP 8.5 should be released. - Added support for pre-release (daily) versions of PHP 8.5. --- PHP Monitor.xcodeproj/project.pbxproj | 12 ++++++------ phpmon/Common/Core/Constants.swift | 14 ++++++++------ phpmon/Domain/Integrations/Homebrew/Brew.swift | 7 ++++--- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/PHP Monitor.xcodeproj/project.pbxproj b/PHP Monitor.xcodeproj/project.pbxproj index a8db459..c7620cb 100644 --- a/PHP Monitor.xcodeproj/project.pbxproj +++ b/PHP Monitor.xcodeproj/project.pbxproj @@ -3688,7 +3688,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1516; + CURRENT_PROJECT_VERSION = 1520; DEAD_CODE_STRIPPING = YES; DEBUG = YES; DEVELOPMENT_TEAM = 8M54J5J787; @@ -3719,7 +3719,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1516; + CURRENT_PROJECT_VERSION = 1520; DEAD_CODE_STRIPPING = YES; DEBUG = NO; DEVELOPMENT_TEAM = 8M54J5J787; @@ -3960,7 +3960,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1516; + CURRENT_PROJECT_VERSION = 1520; DEAD_CODE_STRIPPING = YES; DEBUG = NO; DEVELOPMENT_TEAM = 8M54J5J787; @@ -4077,7 +4077,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1516; + CURRENT_PROJECT_VERSION = 1520; DEAD_CODE_STRIPPING = YES; DEBUG = YES; DEVELOPMENT_TEAM = 8M54J5J787; @@ -4194,7 +4194,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1516; + CURRENT_PROJECT_VERSION = 1520; DEAD_CODE_STRIPPING = YES; DEBUG = YES; DEVELOPMENT_TEAM = 8M54J5J787; @@ -4377,7 +4377,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1516; + CURRENT_PROJECT_VERSION = 1520; DEAD_CODE_STRIPPING = YES; DEBUG = NO; DEVELOPMENT_TEAM = 8M54J5J787; diff --git a/phpmon/Common/Core/Constants.swift b/phpmon/Common/Core/Constants.swift index cbb68f9..29add14 100644 --- a/phpmon/Common/Core/Constants.swift +++ b/phpmon/Common/Core/Constants.swift @@ -24,13 +24,13 @@ struct Constants { This hardcoded list will expire and will need to be modified when the cutoff date occurs, which is when the `php` formula will - become PHP 8.4, and a new build will need to be made. + become PHP 8.5, and a new build will need to be made. If users launch an older version of the app, then a warning will be displayed to let them know that certain operations will not work correctly and that they need to update their app. */ - static let PhpFormulaeCutoffDate = "2024-11-30" // YYYY-MM-DD + static let PhpFormulaeCutoffDate = "2025-11-30" // YYYY-MM-DD /** * The PHP versions that are considered pre-release versions. @@ -39,8 +39,8 @@ struct Constants { */ static var ExperimentalPhpVersions: Set { let releaseDates = [ - // "8.5": Date.fromString("2025-11-01"), // PLACEHOLDER DATE - "8.4": Date.fromString("2024-11-22"), + "8.5": Date.fromString(Self.PhpFormulaeCutoffDate), + "8.4": Date.fromString("2024-11-22") ] return Set(releaseDates @@ -73,7 +73,8 @@ struct Constants { static let DetectedPhpVersions: Set = [ "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", - "8.0", "8.1", "8.2", "8.3", "8.4" + "8.0", "8.1", "8.2", "8.3", "8.4", + "8.5" // DEV ] /** @@ -94,7 +95,8 @@ struct Constants { 4: // Valet v4 dropped support for v7.0 [ "7.1", "7.2", "7.3", "7.4", - "8.0", "8.1", "8.2", "8.3", "8.4" + "8.0", "8.1", "8.2", "8.3", "8.4", + "8.5" // DEV ] ] diff --git a/phpmon/Domain/Integrations/Homebrew/Brew.swift b/phpmon/Domain/Integrations/Homebrew/Brew.swift index c96a3af..679904a 100644 --- a/phpmon/Domain/Integrations/Homebrew/Brew.swift +++ b/phpmon/Domain/Integrations/Homebrew/Brew.swift @@ -35,10 +35,11 @@ class Brew { /// Each formula for each PHP version that can be installed. public static let phpVersionFormulae = [ + "8.5": "shivammathur/php/php@8.5", "8.4": "shivammathur/php/php@8.4", - "8.3": "php@8.3", - "8.2": "php@8.2", - "8.1": "php@8.1", + "8.3": "shivammathur/php/php@8.3", + "8.2": "shivammathur/php/php@8.2", + "8.1": "shivammathur/php/php@8.1", "8.0": "shivammathur/php/php@8.0", "7.4": "shivammathur/php/php@7.4", "7.3": "shivammathur/php/php@7.3",