Decrease PHP version requirement to 7.2.0

This commit is contained in:
Pig Fang 2019-08-28 17:36:20 +08:00
parent c9cdc6640c
commit 15c3c0423a
8 changed files with 12 additions and 12 deletions

View File

@ -7,7 +7,7 @@
<a href="https://circleci.com/gh/bs-community/blessing-skin-server"><img src="https://flat.badgen.net/circleci/github/bs-community/blessing-skin-server" alt="Circle CI Status"></a>
<a href="https://codecov.io/gh/bs-community/blessing-skin-server/branch"><img src="https://flat.badgen.net/codecov/c/github/bs-community/blessing-skin-server" alt="Codecov" /></a>
<a href="https://github.com/bs-community/blessing-skin-server/releases"><img src="https://flat.badgen.net/github/release/bs-community/blessing-skin-server" alt="Latest Stable Version"></a>
<img src="https://flat.badgen.net/badge/PHP/7.2.12+/orange" alt="PHP 7.2.12+">
<img src="https://flat.badgen.net/badge/PHP/7.2.0+/orange" alt="PHP 7.2.0+">
<img src="https://flat.badgen.net/github/license/bs-community/blessing-skin-server" alt="License">
</p>
@ -40,7 +40,7 @@ Blessing Skin 是一个开源的 PHP 项目,这意味着您可以自由地在
Blessing Skin 对您的服务器有一定的要求。_在大多数情况下下列所需的 PHP 扩展已经开启。_
- 一台支持 URL 重写的主机Nginx 或 Apache
- **PHP >= 7.2.12** [(服务器不支持?)](https://blessing.netlify.com/versions.html)
- **PHP >= 7.2.0** [(服务器不支持?)](https://blessing.netlify.com/versions.html)
- 安装并启用如下 PHP 扩展:
- OpenSSL
- PDO

View File

@ -7,7 +7,7 @@
<a href="https://circleci.com/gh/bs-community/blessing-skin-server"><img src="https://flat.badgen.net/circleci/github/bs-community/blessing-skin-server" alt="Circle CI Status"></a>
<a href="https://codecov.io/gh/bs-community/blessing-skin-server/branch"><img src="https://flat.badgen.net/codecov/c/github/bs-community/blessing-skin-server" alt="Codecov" /></a>
<a href="https://github.com/bs-community/blessing-skin-server/releases"><img src="https://flat.badgen.net/github/release/bs-community/blessing-skin-server" alt="Latest Stable Version"></a>
<img src="https://flat.badgen.net/badge/PHP/7.2.12+/orange" alt="PHP 7.2.12+">
<img src="https://flat.badgen.net/badge/PHP/7.2.0+/orange" alt="PHP 7.2.0+">
<img src="https://flat.badgen.net/github/license/bs-community/blessing-skin-server" alt="License">
</p>
@ -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.12** (use v2.x branch if your server doesn't meet the requirements)
- **PHP >= 7.2.0** (use v2.x branch if your server doesn't meet the requirements)
- OpenSSL PHP Extension
- PDO PHP Extension
- Mbstring PHP Extension

View File

@ -7,10 +7,10 @@
exit($error);
}
if (version_compare(PHP_VERSION, '7.2.12', '<')) {
if (version_compare(PHP_VERSION, '7.2.0', '<')) {
die_with_utf8_encoding(
'[Error] Blessing Skin requires PHP version >= 7.2.12, you are now using '.PHP_VERSION.'<br>'.
'[错误] 你的 PHP 版本过低('.PHP_VERSION.'Blessing Skin 要求至少为 7.2.12'
'[Error] Blessing Skin requires PHP version >= 7.2.0, you are now using '.PHP_VERSION.'<br>'.
'[错误] 你的 PHP 版本过低('.PHP_VERSION.'Blessing Skin 要求至少为 7.2.0'
);
}

View File

@ -3,7 +3,7 @@
"description": "A web application brings your custom skins back in offline Minecraft servers.",
"license": "MIT",
"require": {
"php": ">=7.2.12",
"php": ">=7.2.0",
"ext-zip": "*",
"ext-openssl": "*",
"ext-pdo": "*",

2
composer.lock generated
View File

@ -6809,7 +6809,7 @@
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": ">=7.2.12",
"php": ">=7.2.0",
"ext-zip": "*",
"ext-openssl": "*",
"ext-pdo": "*",

View File

@ -12,7 +12,7 @@
- Tweaked policy of retrieve CA cert for GuzzleHttp.
- Refactor account system.
- PHP version requirement is increased to 7.2.12.
- PHP version requirement is increased to 7.2.0.
## Fixed

View File

@ -12,7 +12,7 @@
- 修改 GuzzleHttp 库获取 CA 证书的策略
- 重构用户系统
- PHP 版本最低要求为 7.2.12
- PHP 版本最低要求为 7.2.0
## 修复

View File

@ -112,7 +112,7 @@ class UpdateControllerTest extends TestCase
{
return json_encode(array_merge([
'spec' => 2,
'php' => '7.2.12',
'php' => '7.2.0',
'latest' => $version,
'url' => "https://whatever.test/$version/update.zip",
], $extra));