From a78672927b00bdfe171d25fc3b22398b81e9af7f Mon Sep 17 00:00:00 2001 From: Nico Verbruggen Date: Mon, 18 Oct 2021 23:45:35 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Support=20for=20upcoming=20releases?= =?UTF-8?q?=20of=20PHP=208.1=20and=208.2=20(dev)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + phpmon/Constants.swift | 21 ++++++++++++++++++++- phpmon/Domain/Core/App.swift | 6 +++--- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index faffc79..c5565d5 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,7 @@ If you're still having issues, here's a few common questions & answers, as well
  • PHP 7.4
  • PHP 8.0
  • PHP 8.1
  • +
  • PHP 8.2 (experimental)
  • For more details, consult the [constants file](https://github.com/nicoverbruggen/phpmon/blob/main/phpmon/Constants.swift#L16) file to see which versions are supported. diff --git a/phpmon/Constants.swift b/phpmon/Constants.swift index af6a6c5..483da6a 100644 --- a/phpmon/Constants.swift +++ b/phpmon/Constants.swift @@ -9,11 +9,21 @@ import Cocoa class 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 PHP versions supported by this application. * Versions that do not appear in this array are omitted from the list. */ static let SupportedPhpVersions = [ + // ==================== + // STABLE RELEASES + // ==================== + // Versions of PHP that are stable and are supported. "5.6", "7.0", "7.1", @@ -21,7 +31,16 @@ class Constants { "7.3", "7.4", "8.0", - "8.1" + "8.1", + + // ==================== + // 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" ] + + } diff --git a/phpmon/Domain/Core/App.swift b/phpmon/Domain/Core/App.swift index 2e62f9c..3a48958 100644 --- a/phpmon/Domain/Core/App.swift +++ b/phpmon/Domain/Core/App.swift @@ -69,10 +69,10 @@ class App { If you're up to date, `php` will be aliased to the latest version, but that might not be the case. - We'll technically default to version 8.0, but the information should always be loaded - from Homebrew itself upon starting the application. + We'll technically default to the version in Constants.swift, but the information + should always be loaded from Homebrew itself upon startup. */ - var brewPhpVersion: String = "8.0" + var brewPhpVersion: String = Constants.LatestStablePhpVersion /** The shortcut the user has requested.