Increase PHP version requirement

This commit is contained in:
Pig Fang 2019-08-09 22:56:54 +08:00
parent 0651fdac67
commit 457594797c
9 changed files with 16 additions and 27 deletions

View File

@ -24,7 +24,7 @@ jobs:
composer: composer:
working_directory: ~/repo working_directory: ~/repo
docker: docker:
- image: blessingskin/ci:7.1 - image: blessingskin/ci:7.2
steps: steps:
- checkout - checkout
- restore_cache: - restore_cache:
@ -44,17 +44,6 @@ jobs:
paths: paths:
- . - .
php7.1:
working_directory: ~/repo
docker:
- image: blessingskin/ci:7.1
steps:
- attach_workspace:
at: ~/repo
- run: touch storage/testing.sqlite
- run: ./vendor/bin/phpunit --coverage-clover=coverage.xml
- run: bash <(curl -s https://codecov.io/bash) -cF php
php7.2: php7.2:
working_directory: ~/repo working_directory: ~/repo
docker: docker:
@ -63,7 +52,8 @@ jobs:
- attach_workspace: - attach_workspace:
at: ~/repo at: ~/repo
- run: touch storage/testing.sqlite - run: touch storage/testing.sqlite
- run: ./vendor/bin/phpunit - run: ./vendor/bin/phpunit --coverage-clover=coverage.xml
- run: bash <(curl -s https://codecov.io/bash) -cF php
php7.3: php7.3:
working_directory: ~/repo working_directory: ~/repo
@ -81,9 +71,6 @@ workflows:
jobs: jobs:
- frontend - frontend
- composer - composer
- php7.1:
requires:
- composer
- php7.2: - php7.2:
requires: requires:
- composer - composer

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://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://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> <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.1.8+/orange" alt="PHP 7.1.8+"> <img src="https://flat.badgen.net/badge/PHP/7.2.12+/orange" alt="PHP 7.2.12+">
<img src="https://flat.badgen.net/github/license/bs-community/blessing-skin-server" alt="License"> <img src="https://flat.badgen.net/github/license/bs-community/blessing-skin-server" alt="License">
</p> </p>
@ -40,7 +40,7 @@ Blessing Skin 是一个开源的 PHP 项目,这意味着您可以自由地在
Blessing Skin 对您的服务器有一定的要求。_在大多数情况下下列所需的 PHP 扩展已经开启。_ Blessing Skin 对您的服务器有一定的要求。_在大多数情况下下列所需的 PHP 扩展已经开启。_
- 一台支持 URL 重写的主机Nginx、Apache 或 IIS - 一台支持 URL 重写的主机Nginx、Apache 或 IIS
- **PHP >= 7.1.8** [(服务器不支持?)](https://github.com/bs-community/blessing-skin-server/wiki/%E7%89%88%E6%9C%AC%E8%AF%B4%E6%98%8E) - **PHP >= 7.2.12** [(服务器不支持?)](https://github.com/bs-community/blessing-skin-server/wiki/%E7%89%88%E6%9C%AC%E8%AF%B4%E6%98%8E)
- 安装并启用如下 PHP 扩展: - 安装并启用如下 PHP 扩展:
- OpenSSL - OpenSSL
- PDO - 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://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://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> <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.1.8+/orange" alt="PHP 7.1.8+"> <img src="https://flat.badgen.net/badge/PHP/7.2.12+/orange" alt="PHP 7.2.12+">
<img src="https://flat.badgen.net/github/license/bs-community/blessing-skin-server" alt="License"> <img src="https://flat.badgen.net/github/license/bs-community/blessing-skin-server" alt="License">
</p> </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._ Blessing Skin has only a few system requirements. _In most cases, these PHP extensions are already enabled._
- Web server with URL rewriting enabled - Web server with URL rewriting enabled
- **PHP >= 7.1.8** (use v2.x branch if your server doesn't meet the requirements) - **PHP >= 7.2.12** (use v2.x branch if your server doesn't meet the requirements)
- OpenSSL PHP Extension - OpenSSL PHP Extension
- PDO PHP Extension - PDO PHP Extension
- Mbstring PHP Extension - Mbstring PHP Extension

View File

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

View File

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

4
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "ad7b77c5a5fbb2add5ab2c9d2b37a8f1", "content-hash": "eb71fb9d875289395e7b43be6a663b41",
"packages": [ "packages": [
{ {
"name": "composer/ca-bundle", "name": "composer/ca-bundle",
@ -6808,7 +6808,7 @@
"prefer-stable": false, "prefer-stable": false,
"prefer-lowest": false, "prefer-lowest": false,
"platform": { "platform": {
"php": ">=7.1.8", "php": ">=7.2.12",
"ext-zip": "*", "ext-zip": "*",
"ext-openssl": "*", "ext-openssl": "*",
"ext-pdo": "*", "ext-pdo": "*",

View File

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

View File

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

View File

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