summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PHPINFO5
-rw-r--r--REFLECTION21
-rw-r--r--php-pecl-yac.spec39
3 files changed, 42 insertions, 23 deletions
diff --git a/PHPINFO b/PHPINFO
index 79fa962..5af536f 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,9 +2,9 @@
yac
yac support => enabled
-Version => 2.1.2
+Version => 2.2.0
Shared Memory => mmap
-Serializer => php
+Serializer => php, msgpack, igbinary, json
Directive => Local Value => Master Value
yac.enable => On => On
@@ -13,3 +13,4 @@ yac.keys_memory_size => 4M => 4M
yac.values_memory_size => 64M => 64M
yac.compress_threshold => -1 => -1
yac.enable_cli => 0 => 0
+yac.serializer => php => php
diff --git a/REFLECTION b/REFLECTION
index e970cb0..a7b3b62 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,10 @@
-Extension [ <persistent> extension #112 yac version 2.1.2 ] {
+Extension [ <persistent> extension #112 yac version 2.2.0 ] {
+
+ - Dependencies {
+ Dependency [ msgpack (Required) ]
+ Dependency [ igbinary (Required) ]
+ Dependency [ json (Required) ]
+ }
- INI {
Entry [ yac.enable <SYSTEM> ]
@@ -19,14 +25,21 @@ Extension [ <persistent> extension #112 yac version 2.1.2 ] {
Entry [ yac.enable_cli <SYSTEM> ]
Current = '0'
}
+ Entry [ yac.serializer <SYSTEM> ]
+ Current = 'php'
+ }
}
- - Constants [5] {
- Constant [ string YAC_VERSION ] { 2.1.2 }
+ - Constants [9] {
+ Constant [ string YAC_VERSION ] { 2.2.0 }
Constant [ int YAC_MAX_KEY_LEN ] { 48 }
Constant [ int YAC_MAX_VALUE_RAW_LEN ] { 67108863 }
Constant [ int YAC_MAX_RAW_COMPRESSED_LEN ] { 1048576 }
- Constant [ string YAC_SERIALIZER ] { PHP }
+ Constant [ int YAC_SERIALIZER_PHP ] { 0 }
+ Constant [ int YAC_SERIALIZER_MSGPACK ] { 2 }
+ Constant [ int YAC_SERIALIZER_IGBINARY ] { 3 }
+ Constant [ int YAC_SERIALIZER_JSON ] { 1 }
+ Constant [ int YAC_SERIALIZER ] { 0 }
}
- Classes [1] {
diff --git a/php-pecl-yac.spec b/php-pecl-yac.spec
index 920f85d..c531416 100644
--- a/php-pecl-yac.spec
+++ b/php-pecl-yac.spec
@@ -14,10 +14,6 @@
%scl_package php-pecl-yac
%endif
-# TODO use --enable-msgpack
-# See https://github.com/laruence/yac/issues/107 - Serializer choice at runtime
-# And https://github.com/laruence/yac/pull/106 - module dep
-
%global gh_commit 7e5a9edfcfb6ad064c165a0b6abf8d11218fe4b5
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner laruence
@@ -26,16 +22,13 @@
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global pecl_name yac
%global with_tests %{!?_without_tests:1}%{?_without_tests:0}
-%if "%{php_version}" < "5.6"
-%global ini_name %{pecl_name}.ini
-%else
-%global ini_name 40-%{pecl_name}.ini
-%endif
+# after 20-json, 40-igbinary and 40-msgpack
+%global ini_name 50-%{pecl_name}.ini
%global with_fastlz 1
Summary: Lockless user data cache
Name: %{?sub_prefix}php-pecl-%{pecl_name}
-Version: 2.1.2
+Version: 2.2.0
%if 0%{?gh_date:1}
Release: 0.12.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz
@@ -50,12 +43,17 @@ URL: https://pecl.php.net/package/%{pecl_name}
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel > 7
BuildRequires: %{?scl_prefix}php-pear
+BuildRequires: %{?scl_prefix}php-pecl-msgpack-devel
+BuildRequires: %{?scl_prefix}php-pecl-igbinary-devel
%if %{with_fastlz}
BuildRequires: fastlz-devel
%endif
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
+Requires: %{?scl_prefix}php-json%{?_isa}
+Requires: %{?scl_prefix}php-igbinary%{?_isa}
+Requires: %{?scl_prefix}php-msgpack%{?_isa}
%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
# Package have be renamed
@@ -144,6 +142,7 @@ extension = %{pecl_name}.so
;yac.keys_memory_size=4M
;yac.values_memory_size=64M
;yac.compress_threshold=-1
+;yac.serializer=php
EOF
@@ -159,6 +158,9 @@ cp -pr NTS ZTS
peclconf() {
%configure \
%if %{with_fastlz}
+ --enable-json \
+ --enable-msgpack \
+ --enable-igbinary \
--with-system-fastlz \
%endif
--with-php-config=$1
@@ -200,19 +202,17 @@ done
%check
-# TODO: need investigation
-rm ?TS/tests/005.phpt
-
cd NTS
+OPTS="-n -d extension=json.so -d extension=igbinary.so -d extension=msgpack.so"
: Minimal load test for NTS extension
-%{_bindir}/php --no-php-ini \
+%{_bindir}/php $OPTS \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
--modules | grep %{pecl_name}
%if %{with_tests}
: Upstream test suite for NTS extension
TEST_PHP_EXECUTABLE=%{__php} \
-TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \
+TEST_PHP_ARGS="$OPTS -d extension=$PWD/modules/%{pecl_name}.so" \
NO_INTERACTION=1 \
REPORT_EXIT_STATUS=1 \
%{__php} -n run-tests.php --show-diff
@@ -224,14 +224,14 @@ REPORT_EXIT_STATUS=1 \
cd ../ZTS
: Minimal load test for ZTS extension
-%{__ztsphp} --no-php-ini \
+%{__ztsphp} $OPTS \
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
--modules | grep %{pecl_name}
%if %{with_tests}
: Upstream test suite for ZTS extension
TEST_PHP_EXECUTABLE=%{__ztsphp} \
-TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \
+TEST_PHP_ARGS="$OPTS -d extension=$PWD/modules/%{pecl_name}.so" \
NO_INTERACTION=1 \
REPORT_EXIT_STATUS=1 \
%{__ztsphp} -n run-tests.php --show-diff
@@ -276,6 +276,11 @@ fi
%changelog
+* Tue Mar 31 2020 Remi Collet <remi@remirepo.net> - 2.2.0-1
+- update to 2.2.0
+- enable json, igbinary and msgpack serializers
+- rename configuration file to 50-yac.ini to ensure proper load order
+
* Fri Mar 27 2020 Remi Collet <remi@remirepo.net> - 2.1.2-1
- update to 2.1.2