From 546ad07150d545c0587a0457b9d005de614015e5 Mon Sep 17 00:00:00 2001 From: cytopia Date: Mon, 4 Feb 2019 11:22:38 +0100 Subject: [PATCH] Disable Mongo login for PHP 7.3 due to xdebug issues --- .tests/intra-tests/vendor-adminer.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.tests/intra-tests/vendor-adminer.sh b/.tests/intra-tests/vendor-adminer.sh index 888be607..817d3e5c 100755 --- a/.tests/intra-tests/vendor-adminer.sh +++ b/.tests/intra-tests/vendor-adminer.sh @@ -10,6 +10,33 @@ set -o pipefail # https://stackoverflow.com/questions/16703647/why-curl-return-and-error-23-failed-writing-body # +### +### Get current PHP version +### + +printf "[TEST] Get PHP version" +# 1st Try +if ! PHP_VERSION="$( curl -sS localhost/index.php | tac | tac | grep -Eo 'PHP.*?\([.0-9]+' | grep -Eo '\([.0-9]+' | grep -Eo '[0-9]+\.[0-9]+' )"; then + # 2nd Try + sleep 1 + if ! PHP_VERSION="$( curl -sS localhost/index.php | tac | tac | grep -Eo 'PHP.*?\([.0-9]+' | grep -Eo '\([.0-9]+' | grep -Eo '[0-9]+\.[0-9]+' )"; then + # 3rd Try + sleep 1 + if ! PHP_VERSION="$( curl -sS localhost/index.php | tac | tac | grep -Eo 'PHP.*?\([.0-9]+' | grep -Eo '\([.0-9]+' | grep -Eo '[0-9]+\.[0-9]+' )"; then + printf "\r[FAIL] Get PHP version\n" + curl -sS localhost/index.php | tac | tac | grep -Eo 'PHP.*?\([.0-9]+' || true + exit 1 + else + printf "\r[OK] Get PHP version (3 rounds): %s\n" "${PHP_VERSION}" + fi + else + printf "\r[OK] Get PHP version (2 rounds): %s\n" "${PHP_VERSION}" + fi +else + printf "\r[OK] Get PHP version (1 round): %s\n" "${PHP_VERSION}" +fi + + ### ### Retrieve URL for current Adminer version.