summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--174.patch78
-rw-r--r--PHPINFO4
-rw-r--r--REFLECTION11
-rw-r--r--php-pecl-msgpack.spec72
4 files changed, 113 insertions, 52 deletions
diff --git a/174.patch b/174.patch
new file mode 100644
index 0000000..1d74f6f
--- /dev/null
+++ b/174.patch
@@ -0,0 +1,78 @@
+From da2e275aff642de43b94260ac1715379de9572ba Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Fri, 5 Jul 2024 11:47:33 +0200
+Subject: [PATCH] fix tests for 8.4
+
+---
+ tests/015.phpt | 2 +-
+ tests/015b.phpt | 2 +-
+ tests/015e.phpt | 2 +-
+ tests/027.phpt | 2 +-
+ tests/028.phpt | 2 +-
+ 5 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/tests/015.phpt b/tests/015.phpt
+index 4bd0f52..9e053aa 100644
+--- a/tests/015.phpt
++++ b/tests/015.phpt
+@@ -46,7 +46,7 @@ function gc($time) {
+
+ ini_set('session.serialize_handler', 'msgpack');
+
+-session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc');
++@session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc');
+
+ session_start();
+
+diff --git a/tests/015b.phpt b/tests/015b.phpt
+index de383ee..b736fb5 100644
+--- a/tests/015b.phpt
++++ b/tests/015b.phpt
+@@ -45,7 +45,7 @@ function gc($time) {
+ return true;
+ }
+
+-session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc');
++@session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc');
+
+ session_start();
+
+diff --git a/tests/015e.phpt b/tests/015e.phpt
+index b18a34a..0598d42 100644
+--- a/tests/015e.phpt
++++ b/tests/015e.phpt
+@@ -48,7 +48,7 @@ function gc($time) {
+
+ ini_set('session.serialize_handler', 'msgpack');
+
+-session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc');
++@session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc');
+
+ session_start();
+
+diff --git a/tests/027.phpt b/tests/027.phpt
+index c8f89ab..49cf193 100644
+--- a/tests/027.phpt
++++ b/tests/027.phpt
+@@ -53,7 +53,7 @@ class Bar {
+
+ ini_set('session.serialize_handler', 'msgpack');
+
+-session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc');
++@session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc');
+
+
+ $db_object = new Foo();
+diff --git a/tests/028.phpt b/tests/028.phpt
+index a55b90b..a5f7637 100644
+--- a/tests/028.phpt
++++ b/tests/028.phpt
+@@ -88,7 +88,7 @@ function gc($time) {
+
+ ini_set('session.serialize_handler', 'msgpack');
+
+-session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc');
++@session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc');
+
+ session_start();
+
diff --git a/PHPINFO b/PHPINFO
index 49b3fe8..40076fa 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -3,11 +3,13 @@ msgpack
MessagePack Support => enabled
Session Support => enabled
-extension Version => 2.2.0
+MessagePack APCu Serializer ABI => 0
+extension Version => 3.0.0RC1
header Version => 3.2.0
Directive => Local Value => Master Value
msgpack.error_display => On => On
msgpack.php_only => On => On
+msgpack.assoc => On => On
msgpack.illegal_key_insert => Off => Off
msgpack.use_str8_serialization => On => On
diff --git a/REFLECTION b/REFLECTION
index 6298c67..adf666c 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #85 msgpack version 2.2.0 ] {
+Extension [ <persistent> extension #84 msgpack version 3.0.0RC1 ] {
- INI {
Entry [ msgpack.error_display <ALL> ]
@@ -7,6 +7,9 @@ Extension [ <persistent> extension #85 msgpack version 2.2.0 ] {
Entry [ msgpack.php_only <ALL> ]
Current = '1'
}
+ Entry [ msgpack.assoc <ALL> ]
+ Current = '1'
+ }
Entry [ msgpack.illegal_key_insert <ALL> ]
Current = '0'
}
@@ -15,8 +18,9 @@ Extension [ <persistent> extension #85 msgpack version 2.2.0 ] {
}
}
- - Constants [1] {
+ - Constants [2] {
Constant [ int MESSAGEPACK_OPT_PHPONLY ] { -1001 }
+ Constant [ int MESSAGEPACK_OPT_ASSOC ] { -1002 }
}
- Functions {
@@ -51,8 +55,9 @@ Extension [ <persistent> extension #85 msgpack version 2.2.0 ] {
- Classes [2] {
Class [ <internal:msgpack> class MessagePack ] {
- - Constants [1] {
+ - Constants [2] {
Constant [ public int OPT_PHPONLY ] { -1001 }
+ Constant [ public int OPT_ASSOC ] { -1002 }
}
- Static properties [0] {
diff --git a/php-pecl-msgpack.spec b/php-pecl-msgpack.spec
index 9a37a11..b66b9df 100644
--- a/php-pecl-msgpack.spec
+++ b/php-pecl-msgpack.spec
@@ -3,7 +3,7 @@
#
# Fedora spec file for php-pecl-msgpack
#
-# Copyright (c) 2012-2023 Remi Collet
+# Copyright (c) 2012-2024 Remi Collet
# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -11,12 +11,6 @@
#
%{?scl:%scl_package php-pecl-msgpack}
-# Defined in Fedora >= 37 and RHEL >= 10, in PHP >= 7.4 for remirepo
-%{!?__phpize: %global __phpize %{_bindir}/phpize}
-%{!?__ztsphpize: %global __ztsphpize %{_bindir}/zts-phpize}
-%{!?__phpconfig: %global __phpconfig %{_bindir}/php-config}
-%{!?__ztsphpconfig:%global __ztsphpconfig %{_bindir}/zts-php-config}
-
%global gh_commit 943d27267fbf6da6b4d225f344f4731aec0c671b
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner msgpack
@@ -25,9 +19,8 @@
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global ini_name 40-%{pecl_name}.ini
-%global upstream_version 2.2.0
-#global upstream_prever RC2
-#global upstream_lower RC2
+%global upstream_version 3.0.0
+%global upstream_prever RC1
%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever}
%global _configure ../%{sources}/configure
@@ -40,7 +33,7 @@
Summary: API for communicating with MessagePack serialization
Name: %{?scl_prefix}php-pecl-msgpack
License: BSD-3-Clause
-Version: %{upstream_version}%{?upstream_lower:~%{upstream_lower}}
+Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
URL: https://pecl.php.net/package/msgpack
Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Source: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
@@ -49,6 +42,7 @@ BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 7.0
BuildRequires: %{?scl_prefix}php-pear
+BuildRequires: %{?scl_prefix}php-pecl-apcu-devel
%if %{with msgpack}
BuildRequires: msgpack-devel
%else
@@ -57,23 +51,12 @@ Provides: bundled(msgpack) = 3.2.0
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
-%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
-%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
-# Other third party repo stuff
-%if "%{php_version}" > "7.3"
-Obsoletes: php73-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.4"
-Obsoletes: php74-pecl-%{pecl_name} <= %{version}
-%endif
-%endif
-
%description
This extension provide API for communicating with MessagePack serialization.
@@ -107,7 +90,7 @@ These are the files needed to compile programs using MessagePack serializer.
%prep
%setup -qc
-%{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml}
+sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml
cd %{sources}
%if %{with msgpack}
@@ -125,7 +108,6 @@ cd ..
mkdir NTS
%if %{with_zts}
-# duplicate for ZTS build
mkdir ZTS
%endif
@@ -137,8 +119,10 @@ extension = %{pecl_name}.so
; Configuration options
;msgpack.error_display = On
-;msgpack.illegal_key_insert = Off
;msgpack.php_only = On
+;msgpack.assoc = On
+;msgpack.illegal_key_insert = Off
+;msgpack.use_str8_serialization = On
EOF
@@ -209,7 +193,7 @@ cd %{sources}
%if %{with tests}
: Upstream test suite for NTS extension
TEST_PHP_EXECUTABLE=%{__php} \
-TEST_PHP_ARGS="-n -d extension_dir=$PWD/../NTS/modules -d extension=%{pecl_name}.so" \
+TEST_PHP_ARGS="-n -d extension=apcu.so -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
%{__php} -n run-tests.php $OPT
%endif
@@ -223,35 +207,15 @@ REPORT_EXIT_STATUS=1 \
%if %{with tests}
: Upstream test suite for ZTS extension
TEST_PHP_EXECUTABLE=%{__ztsphp} \
-TEST_PHP_ARGS="-n -d extension_dir=$PWD/../ZTS/modules -d extension=%{pecl_name}.so" \
+TEST_PHP_ARGS="-n -d extension=apcu.so -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
%{__ztsphp} -n run-tests.php $OPT
%endif
%endif
-%if 0%{?fedora} < 24 && 0%{?rhel} < 8
-# when pear installed alone, after us
-%triggerin -- %{?scl_prefix}php-pear
-if [ -x %{__pecl} ] ; then
- %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
-fi
-
-# posttrans as pear can be installed after us
-%posttrans
-if [ -x %{__pecl} ] ; then
- %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
-fi
-
-%postun
-if [ $1 -eq 0 -a -x %{__pecl} ] ; then
- %{pecl_uninstall} %{pecl_name} >/dev/null || :
-fi
-%endif
-
-
%files
-%{?_licensedir:%license %{sources}/LICENSE}
+%license %{sources}/LICENSE
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -274,6 +238,18 @@ fi
%changelog
+* Mon Aug 26 2024 Remi Collet <remi@remirepo.net> - 3.0.0~RC1-1
+- update to 3.0.0RC1
+- drop patch merged upstream
+- add APCu support
+
+* Fri Jul 5 2024 Remi Collet <remi@remirepo.net> - 2.2.0-3
+- fix test suite with 8.4 using patch from
+ https://github.com/msgpack/msgpack-php/pull/174
+
+* Wed Aug 30 2023 Remi Collet <remi@remirepo.net> - 2.2.0-2
+- rebuild for PHP 8.3.0RC1
+
* Fri Jun 2 2023 Remi Collet <remi@remirepo.net> - 2.2.0-1
- update to 2.2.0
- build out of sources tree