From 537d34c0bf27db343797769ecefa8bc115f12ca2 Mon Sep 17 00:00:00 2001
From: Pig Fang
Date: Fri, 6 Mar 2020 10:19:56 +0800
Subject: [PATCH] increase PHP version requirement
---
README.md | 4 ++--
README_EN.md | 4 ++--
bootstrap/chkenv.php | 2 +-
composer.json | 2 +-
resources/misc/changelogs/en/5.0.0.md | 2 +-
resources/misc/changelogs/zh_CN/5.0.0.md | 2 +-
scripts/release.ps1 | 2 +-
tests/HttpTest/ControllersTest/UpdateControllerTest.php | 2 +-
8 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/README.md b/README.md
index 894226e7..f4558f7e 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@
-
+
@@ -40,7 +40,7 @@ Blessing Skin 是一个开源的 PHP 项目,这意味着您可以自由地在
Blessing Skin 对您的服务器有一定的要求。_在大多数情况下,下列所需的 PHP 扩展已经开启。_
- 一台支持 URL 重写的主机,Nginx 或 Apache
-- **PHP >= 7.2.0** [(服务器不支持?)](https://blessing.netlify.com/versions.html)
+- **PHP >= 7.2.5** [(服务器不支持?)](https://blessing.netlify.com/versions.html)
- 安装并启用如下 PHP 扩展:
- OpenSSL
- PDO
diff --git a/README_EN.md b/README_EN.md
index dc824a54..24991ba7 100644
--- a/README_EN.md
+++ b/README_EN.md
@@ -7,7 +7,7 @@
-
+
@@ -40,7 +40,7 @@ Blessing Skin is an open-source project written in PHP, which means you can depl
Blessing Skin has only a few system requirements. _In most cases, these PHP extensions are already enabled._
- Web server with URL rewriting enabled (Nginx or Apache)
-- **PHP >= 7.2.0** (use v2.x branch if your server doesn't meet the requirements)
+- **PHP >= 7.2.5**
- OpenSSL PHP Extension
- PDO PHP Extension
- Mbstring PHP Extension
diff --git a/bootstrap/chkenv.php b/bootstrap/chkenv.php
index 869cff75..2017209a 100644
--- a/bootstrap/chkenv.php
+++ b/bootstrap/chkenv.php
@@ -14,7 +14,7 @@
);
}
- $requiredVersion = '7.2.0';
+ $requiredVersion = '7.2.5';
preg_match('/(\d+\.\d+\.\d+)/', PHP_VERSION, $matches);
$version = $matches[1];
if (version_compare($version, $requiredVersion, '<')) {
diff --git a/composer.json b/composer.json
index ae306447..0b04db94 100644
--- a/composer.json
+++ b/composer.json
@@ -3,7 +3,7 @@
"description": "A web application brings your custom skins back in offline Minecraft servers.",
"license": "MIT",
"require": {
- "php": ">=7.2.0",
+ "php": ">=7.2.5",
"ext-ctype": "*",
"ext-gd": "*",
"ext-json": "*",
diff --git a/resources/misc/changelogs/en/5.0.0.md b/resources/misc/changelogs/en/5.0.0.md
index 1fb49e61..490de186 100644
--- a/resources/misc/changelogs/en/5.0.0.md
+++ b/resources/misc/changelogs/en/5.0.0.md
@@ -29,7 +29,7 @@
- Tweaked policy of retrieve CA cert for GuzzleHttp.
- Refactor account system.
-- PHP version requirement is increased to 7.2.0.
+- PHP version requirement is increased to 7.2.5.
- Use `install.lock` file to detect status of installation.
- Load front end i18n text from `lang/front-end.yml` of a plugin automatically.
- Upgraded AdminLTE to v3.
diff --git a/resources/misc/changelogs/zh_CN/5.0.0.md b/resources/misc/changelogs/zh_CN/5.0.0.md
index 0ff7af75..ef537c89 100644
--- a/resources/misc/changelogs/zh_CN/5.0.0.md
+++ b/resources/misc/changelogs/zh_CN/5.0.0.md
@@ -29,7 +29,7 @@
- 修改 GuzzleHttp 库获取 CA 证书的策略
- 重构用户系统
-- PHP 版本最低要求为 7.2.0
+- PHP 版本最低要求为 7.2.5
- 使用 `install.lock` 文件来检测安装状态
- 插件系统:自动从 `lang/front-end.yml` 中加载前端多语言
- AdminLTE 升级到 v3
diff --git a/scripts/release.ps1 b/scripts/release.ps1
index 5cf0cc37..05f9d9db 100644
--- a/scripts/release.ps1
+++ b/scripts/release.ps1
@@ -29,7 +29,7 @@ Copy-Item -Path "../$zip" -Destination $zip
$manifest.latest = $current
$manifest.url = $manifest.url.Replace($last, $current)
-$manifest.php = '7.2.0'
+$manifest.php = '7.2.5'
ConvertTo-Json $manifest | Out-File -FilePath update_preview.json
Write-Host "Update source is prepared." -ForegroundColor Green
diff --git a/tests/HttpTest/ControllersTest/UpdateControllerTest.php b/tests/HttpTest/ControllersTest/UpdateControllerTest.php
index 27c7861f..ecd4ff42 100644
--- a/tests/HttpTest/ControllersTest/UpdateControllerTest.php
+++ b/tests/HttpTest/ControllersTest/UpdateControllerTest.php
@@ -134,7 +134,7 @@ class UpdateControllerTest extends TestCase
{
return json_encode(array_merge([
'spec' => 2,
- 'php' => '7.2.0',
+ 'php' => '7.2.5',
'latest' => $version,
'url' => "https://whatever.test/$version/update.zip",
], $extra));