From fcc9efa0852800892693e7226807a1cc73902fc2 Mon Sep 17 00:00:00 2001 From: mrgeneralgoo Date: Wed, 24 Jan 2024 20:34:50 +0800 Subject: [PATCH] Update requires php version to 8.0 --- .github/workflows/release.yml | 4 ++-- MarkdownParse.php | 4 ++-- composer.json | 1 + composer.lock | 6 ++++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 210fb16..b90d93c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: - php: [7.4, 8.0, 8.1, 8.2, 8.3] + php: [8.0, 8.1, 8.2, 8.3] steps: - name: Checkout Repository @@ -52,7 +52,7 @@ jobs: - name: Create Release uses: ncipollo/release-action@v1 with: - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.AUTO_RELEASE_TOKEN }} tag: ${{ github.ref }} artifacts: "MarkdownParse.zip" body: | diff --git a/MarkdownParse.php b/MarkdownParse.php index 4a999a4..f24524a 100644 --- a/MarkdownParse.php +++ b/MarkdownParse.php @@ -50,12 +50,12 @@ private function __construct() * Get the singleton instance of MarkdownParse * * @return MarkdownParse The singleton instance - * @throws \RuntimeException If PHP version is less than 7.4.0 + * @throws \RuntimeException If PHP version is less than 8.0 */ public static function getInstance(): MarkdownParse { if (self::$instance === null) { - $requiredVersion = '7.4.0'; + $requiredVersion = '8.0'; if (version_compare(phpversion(), $requiredVersion, '<')) { throw new \RuntimeException('MarkdownParse requires PHP ' . $requiredVersion . ' or later.'); } diff --git a/composer.json b/composer.json index 02eb7ba..e2867cb 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,6 @@ { "require": { + "php": "^8.0", "league/commonmark": "^2.4", "wnx/commonmark-mark-extension": "^1.2", "simonvomeyser/commonmark-ext-lazy-image": "^2.0", diff --git a/composer.lock b/composer.lock index 4a68df3..f20f13b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d49bc21c639154edb3bd058684740ffc", + "content-hash": "9e7ba61f51aa6ee580288fe27bb93171", "packages": [ { "name": "clue/phar-composer", @@ -2251,7 +2251,9 @@ "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, - "platform": [], + "platform": { + "php": "^8.0" + }, "platform-dev": [], "plugin-api-version": "2.6.0" }