From 4508f562f8ef3c07b4490bef0e7563e73ef9a5f0 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Mon, 30 Nov 2020 15:09:38 +0100 Subject: [PATCH] update for PHP-8 --- Makefile | 3 ++- php-version-url-dist.php | 8 ++++++-- php-version.php | 10 ++++++++-- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 1dd2c87..4a903a8 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ export -PHP ?= 7.3 +PHP ?= 7.4 JOBS ?= 2 PHP_MIRROR ?= https://php.net/distributions/ TMPDIR ?= /tmp @@ -62,6 +62,7 @@ versions: $(PHP_RELEASES) $(PHP_RELEASES): $(makdir)/php-version-url-dist.php $(makdir)/php-version-url-qa.php | $(srcdir) cd $(makdir) && printf "master\tmaster\t%s/fetch-master.sh\n" $$(pwd) >$@ + curl -sSL "https://php.net/releases/index.php?json&version=8&max=-1" | $(makdir)/php-version-url-dist.php >>$@ curl -sSL "https://php.net/releases/index.php?json&version=7&max=-1" | $(makdir)/php-version-url-dist.php >>$@ curl -sSL "https://php.net/releases/index.php?json&version=5&max=-1" | $(makdir)/php-version-url-dist.php >>$@ curl -sSL "https://qa.php.net/api.php?type=qa-releases&format=json" | $(makdir)/php-version-url-qa.php >>$@ diff --git a/php-version-url-dist.php b/php-version-url-dist.php index cc36635..f0e487d 100755 --- a/php-version-url-dist.php +++ b/php-version-url-dist.php @@ -25,6 +25,10 @@ if (!empty($versions) && !isset($versions["error"])) { } foreach ($by_minor as $v => $r) { - printf("%s\t%s\tcurl -sSL %s%s | tar xj\n", $v, $r, $mirror, - $versions[$r]["source"][0]["filename"]); + $compress = array("gz" => "z", "bz2" => "j", "xz" => "J"); + $filename = $versions[$r]["source"][0]["filename"]; + printf("%s\t%s\tcurl -sSL %s%s | tar x%s\n", $v, $r, $mirror, + $filename, + $compress[pathinfo($filename, PATHINFO_EXTENSION)] + ); } diff --git a/php-version.php b/php-version.php index 63d35b3..d7b15f3 100755 --- a/php-version.php +++ b/php-version.php @@ -45,10 +45,16 @@ if (isset($by_minor[$version])) { print("7.1.27\n"); break; case "7.2": - print("7.2.16\n"); + print("7.2.34\n"); break; case "7.3": - print("7.3.3\n"); + print("7.3.25\n"); + break; + case "7.4": + print("7.4.13\n"); + break; + case "8.0": + print("8.0.0\n"); break; case "master": print("master\n"); -- 2.30.2