Skip to content

Commit

Permalink
Bump to PHP 7.3 minimum (librenms#12288)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jellyfrog authored Nov 3, 2020
1 parent 0ac05fd commit bc02ab3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion daily.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
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;
}
Expand Down
10 changes: 8 additions & 2 deletions daily.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit bc02ab3

Please sign in to comment.