From 2cdf6f92c1ba145529efa5cf4ae1a612d1c8e1a7 Mon Sep 17 00:00:00 2001 From: Laurent Laville Date: Sat, 17 Jul 2021 07:52:10 +0200 Subject: [PATCH 1/4] add support for yac --- data/supported-extensions | 1 + install-php-extensions | 27 +++++++++++++++++++++++++++ scripts/tests/yac | 25 +++++++++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100755 scripts/tests/yac diff --git a/data/supported-extensions b/data/supported-extensions index 984567f..69f3819 100644 --- a/data/supported-extensions +++ b/data/supported-extensions @@ -102,6 +102,7 @@ xlswriter 7.0 7.1 7.2 7.3 7.4 8.0 xmldiff 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 xmlrpc 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 xsl 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 +yac 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 yaml 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 yar 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 zip 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 diff --git a/install-php-extensions b/install-php-extensions index 0e3aa96..14aa607 100755 --- a/install-php-extensions +++ b/install-php-extensions @@ -2282,6 +2282,33 @@ installRemoteModule() { addConfigureOption enable-reader yes fi ;; + yac) + if test -z "$installRemoteModule_version"; then + if test $PHP_MAJMIN_VERSION -le 506; then + installRemoteModule_version=0.9.2 + fi + fi + if test -z "$installRemoteModule_version" || test $(compareVersions "$installRemoteModule_version" 2.2.0) -ge 0; then + # Enable igbinary serializer support + if php --ri igbinary >/dev/null 2>/dev/null; then + addConfigureOption enable-igbinary yes + else + addConfigureOption enable-igbinary no + fi + # Enable json serializer support + if php --ri json >/dev/null 2>/dev/null; then + addConfigureOption enable-json yes + else + addConfigureOption enable-json no + fi + # Enable msgpack serializer support + if php --ri msgpack >/dev/null 2>/dev/null; then + addConfigureOption enable-msgpack yes + else + addConfigureOption enable-msgpack no + fi + fi + ;; yaml) if test -z "$installRemoteModule_version"; then if test $PHP_MAJMIN_VERSION -le 506; then diff --git a/scripts/tests/yac b/scripts/tests/yac new file mode 100755 index 0000000..5585fe6 --- /dev/null +++ b/scripts/tests/yac @@ -0,0 +1,25 @@ +#!/bin/sh + +set -o errexit +set -o nounset + +rc=0 +if test -z "$(php --ri yac | grep 'Serializer => .*igbinary')"; then + echo 'yac has not been compiled with Igbinary support' >&2 + rc=1 +else + echo 'yac has been compiled with Igbinary support' +fi +if test -z "$(php --ri yac | grep 'Serializer => .*json')"; then + echo 'yac has not been compiled with Json support' >&2 + rc=1 +else + echo 'yac has been compiled with Json support' +fi +if test -z "$(php --ri yac | grep 'Serializer => .*msgpack')"; then + echo 'yac has not been compiled with Msgpack support' >&2 + rc=1 +else + echo 'yac has been compiled with Msgpack support' +fi +exit $rc From e8f765e9d1e636a69cc5e3daf1ae02524a3e7089 Mon Sep 17 00:00:00 2001 From: Laurent Laville Date: Sat, 17 Jul 2021 08:35:42 +0200 Subject: [PATCH 2/4] do not fails extension test if some supports are not available --- scripts/tests/yac | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/tests/yac b/scripts/tests/yac index 5585fe6..83bbeaf 100755 --- a/scripts/tests/yac +++ b/scripts/tests/yac @@ -6,19 +6,16 @@ set -o nounset rc=0 if test -z "$(php --ri yac | grep 'Serializer => .*igbinary')"; then echo 'yac has not been compiled with Igbinary support' >&2 - rc=1 else echo 'yac has been compiled with Igbinary support' fi if test -z "$(php --ri yac | grep 'Serializer => .*json')"; then echo 'yac has not been compiled with Json support' >&2 - rc=1 else echo 'yac has been compiled with Json support' fi if test -z "$(php --ri yac | grep 'Serializer => .*msgpack')"; then echo 'yac has not been compiled with Msgpack support' >&2 - rc=1 else echo 'yac has been compiled with Msgpack support' fi From 73c96fc031c73f4a731e95f79b0f1c854ecdf75e Mon Sep 17 00:00:00 2001 From: Laurent Laville Date: Sat, 17 Jul 2021 09:22:01 +0200 Subject: [PATCH 3/4] removed PHP 5 compatibility (not enough stable) --- data/supported-extensions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/supported-extensions b/data/supported-extensions index 69f3819..48580ac 100644 --- a/data/supported-extensions +++ b/data/supported-extensions @@ -102,7 +102,7 @@ xlswriter 7.0 7.1 7.2 7.3 7.4 8.0 xmldiff 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 xmlrpc 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 xsl 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 -yac 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 +yac 7.0 7.1 7.2 7.3 7.4 8.0 8.1 yaml 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 yar 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 zip 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 From af74929e3972d23434f01eedcda88c3569df69f7 Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Mon, 2 Aug 2021 17:18:35 +0200 Subject: [PATCH 4/4] Test yac with dependencies Test: yac,yac+igbinary,yac+msgpack,yac+igbinary+msgpack --- scripts/tests/yac | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/scripts/tests/yac b/scripts/tests/yac index 83bbeaf..7f6034c 100755 --- a/scripts/tests/yac +++ b/scripts/tests/yac @@ -4,19 +4,28 @@ set -o errexit set -o nounset rc=0 -if test -z "$(php --ri yac | grep 'Serializer => .*igbinary')"; then - echo 'yac has not been compiled with Igbinary support' >&2 -else - echo 'yac has been compiled with Igbinary support' +if php --ri igbinary >/dev/null 2>/dev/null; then + if test -z "$(php --ri yac | grep 'Serializer => .*igbinary')"; then + echo 'yac has not been compiled with Igbinary support' >&2 + rc=1 + else + echo 'yac has been compiled with Igbinary support' + fi fi -if test -z "$(php --ri yac | grep 'Serializer => .*json')"; then - echo 'yac has not been compiled with Json support' >&2 -else - echo 'yac has been compiled with Json support' +if php --ri json >/dev/null 2>/dev/null; then + if test -z "$(php --ri yac | grep 'Serializer => .*json')"; then + echo 'yac has not been compiled with Json support' >&2 + rc=1 + else + echo 'yac has been compiled with Json support' + fi fi -if test -z "$(php --ri yac | grep 'Serializer => .*msgpack')"; then - echo 'yac has not been compiled with Msgpack support' >&2 -else - echo 'yac has been compiled with Msgpack support' +if php --ri msgpack >/dev/null 2>/dev/null; then + if test -z "$(php --ri yac | grep 'Serializer => .*msgpack')"; then + echo 'yac has not been compiled with Msgpack support' >&2 + rc=1 + else + echo 'yac has been compiled with Msgpack support' + fi fi exit $rc