Bump to PHP 7.3 minimum (#12288)

This commit is contained in:
Jellyfrog
2020-11-03 02:56:49 +01:00
committed by GitHub
parent 0ac05fda69
commit bc02ab3f6e
2 changed files with 9 additions and 3 deletions

View File

@@ -161,7 +161,7 @@ if ($options['f'] === 'handle_notifiable') {
if ($options['r'] === 'php53') {
$phpver = '5.6.4';
$eol_date = 'January 10th, 2018';
} elseif ($options['r'] === 'php56' || $options['r'] === 'php71') {
} elseif ($options['r'] === 'php56' || $options['r'] === 'php71' || $options['r'] === 'php72') {
$phpver = Php::PHP_MIN_VERSION;
$eol_date = Php::PHP_MIN_VERSION_DATE;
}

View File

@@ -132,13 +132,14 @@ check_dependencies() {
local ver_56=$(php -r "echo (int)version_compare(PHP_VERSION, '5.6.4', '<');")
local ver_71=$(php -r "echo (int)version_compare(PHP_VERSION, '7.1.3', '<');")
local ver_72=$(php -r "echo (int)version_compare(PHP_VERSION, '7.2.5', '<');")
local ver_73=$(php -r "echo (int)version_compare(PHP_VERSION, '7.3', '<');")
local python3=$(python3 -c "import sys;print(int(sys.version_info < (3, 4)))" 2> /dev/null)
local python_deps=$("${LIBRENMS_DIR}/scripts/check_requirements.py" > /dev/null 2>&1; echo $?)
local phpver="master"
local pythonver="master"
local old_branches="php53 php56 php71-python2 php72"
local old_branches="php53 php56 php71-python2"
if [[ " $old_branches " =~ " $branch " ]] && [[ "$ver_72" == "0" && "$python3" == "0" && "$python_deps" == "0" ]]; then
if [[ " $old_branches " =~ " $branch " ]] && [[ "$ver_73" == "0" && "$python3" == "0" && "$python_deps" == "0" ]]; then
status_run "Supported PHP and Python version, switched back to master branch." 'git checkout master'
elif [[ "$ver_56" != "0" ]]; then
phpver="php53"
@@ -167,6 +168,11 @@ check_dependencies() {
if [[ "$branch" != "php71-python2" ]]; then
status_run "${msg}switched to php71-python2 branch." 'git checkout php71-python2'
fi
elif [[ "$ver_73" != "0" ]]; then
phpver="php72"
if [[ "$branch" != "php72" ]]; then
status_run "Unsupported PHP version, switched to php72 branch." 'git checkout php72'
fi
fi
set_notifiable_result phpver ${phpver}