summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PHPINFO7
-rw-r--r--REFLECTION25
-rw-r--r--php-pecl-memcached.spec227
3 files changed, 122 insertions, 137 deletions
diff --git a/PHPINFO b/PHPINFO
index 0142ac7..70f19f9 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,13 +2,14 @@
memcached
memcached support => enabled
-Version => 3.2.0
-libmemcached-awesome version => 1.1.1
+Version => 3.3.0
+libmemcached-awesome version => 1.1.4
SASL support => yes
Session support => yes
igbinary support => yes
json support => yes
msgpack support => yes
+zstd support => yes
Directive => Local Value => Master Value
memcached.sess_locking => On => On
@@ -32,9 +33,11 @@ memcached.sess_lock_wait => not set => not set
memcached.sess_lock_max_wait => not set => not set
memcached.compression_type => fastlz => fastlz
memcached.compression_factor => 1.3 => 1.3
+memcached.compression_level => 3 => 3
memcached.compression_threshold => 2000 => 2000
memcached.serializer => igbinary => igbinary
memcached.store_retry_count => 0 => 0
+memcached.item_size_limit => 0 => 0
memcached.default_consistent_hash => Off => Off
memcached.default_binary_protocol => Off => Off
memcached.default_connect_timeout => 0 => 0
diff --git a/REFLECTION b/REFLECTION
index a0f2315..58da66f 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #113 memcached version 3.2.0 ] {
+Extension [ <persistent> extension #118 memcached version 3.3.0 ] {
- Dependencies {
Dependency [ session (Required) ]
@@ -71,6 +71,9 @@ Extension [ <persistent> extension #113 memcached version 3.2.0 ] {
Entry [ memcached.compression_factor <ALL> ]
Current = '1.3'
}
+ Entry [ memcached.compression_level <ALL> ]
+ Current = '3'
+ }
Entry [ memcached.compression_threshold <ALL> ]
Current = '2000'
}
@@ -80,6 +83,9 @@ Extension [ <persistent> extension #113 memcached version 3.2.0 ] {
Entry [ memcached.store_retry_count <ALL> ]
Current = '0'
}
+ Entry [ memcached.item_size_limit <ALL> ]
+ Current = '0'
+ }
Entry [ memcached.default_consistent_hash <ALL> ]
Current = '0'
}
@@ -94,15 +100,18 @@ Extension [ <persistent> extension #113 memcached version 3.2.0 ] {
- Classes [3] {
Class [ <internal:memcached> class Memcached ] {
- - Constants [146] {
- Constant [ public int LIBMEMCACHED_VERSION_HEX ] { 16781313 }
+ - Constants [150] {
+ Constant [ public int LIBMEMCACHED_VERSION_HEX ] { 16781316 }
Constant [ public int OPT_COMPRESSION ] { -1001 }
Constant [ public int OPT_COMPRESSION_TYPE ] { -1004 }
+ Constant [ public int OPT_COMPRESSION_LEVEL ] { -1007 }
Constant [ public int OPT_PREFIX_KEY ] { -1002 }
Constant [ public int OPT_SERIALIZER ] { -1003 }
Constant [ public int OPT_USER_FLAGS ] { -1006 }
Constant [ public int OPT_STORE_RETRY_COUNT ] { -1005 }
+ Constant [ public int OPT_ITEM_SIZE_LIMIT ] { -1008 }
Constant [ public bool HAVE_IGBINARY ] { 1 }
+ Constant [ public bool HAVE_ZSTD ] { 1 }
Constant [ public bool HAVE_JSON ] { 1 }
Constant [ public bool HAVE_MSGPACK ] { 1 }
Constant [ public bool HAVE_ENCODING ] { 1 }
@@ -207,6 +216,7 @@ Extension [ <persistent> extension #113 memcached version 3.2.0 ] {
Constant [ public int SERIALIZER_MSGPACK ] { 5 }
Constant [ public int COMPRESSION_FASTLZ ] { 2 }
Constant [ public int COMPRESSION_ZLIB ] { 1 }
+ Constant [ public int COMPRESSION_ZSTD ] { 3 }
Constant [ public int GET_PRESERVE_ORDER ] { 1 }
Constant [ public int GET_EXTENDED ] { 2 }
Constant [ public int ON_CONNECT ] { 0 }
@@ -413,7 +423,7 @@ Extension [ <persistent> extension #113 memcached version 3.2.0 ] {
Method [ <internal:memcached> public method cas ] {
- Parameters [4] {
- Parameter #0 [ <required> string $cas_token ]
+ Parameter #0 [ <required> string|int|float $cas_token ]
Parameter #1 [ <required> string $key ]
Parameter #2 [ <required> mixed $value ]
Parameter #3 [ <optional> int $expiration = 0 ]
@@ -424,7 +434,7 @@ Extension [ <persistent> extension #113 memcached version 3.2.0 ] {
Method [ <internal:memcached> public method casByKey ] {
- Parameters [5] {
- Parameter #0 [ <required> string $cas_token ]
+ Parameter #0 [ <required> string|int|float $cas_token ]
Parameter #1 [ <required> string $server_key ]
Parameter #2 [ <required> string $key ]
Parameter #3 [ <required> mixed $value ]
@@ -833,8 +843,8 @@ Extension [ <persistent> extension #113 memcached version 3.2.0 ] {
- Properties [4] {
Property [ protected $message = '' ]
Property [ protected $code = 0 ]
- Property [ protected $file = NULL ]
- Property [ protected $line = NULL ]
+ Property [ protected string $file = '' ]
+ Property [ protected int $line = 0 ]
}
- Methods [10] {
@@ -851,6 +861,7 @@ Extension [ <persistent> extension #113 memcached version 3.2.0 ] {
- Parameters [0] {
}
+ - Tentative return [ void ]
}
Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] {
diff --git a/php-pecl-memcached.spec b/php-pecl-memcached.spec
index d4a7425..2f60674 100644
--- a/php-pecl-memcached.spec
+++ b/php-pecl-memcached.spec
@@ -3,16 +3,13 @@
#
# Fedora spec file for php-pecl-memcached
#
-# Copyright (c) 2009-2022 Remi Collet
-# License: CC-BY-SA
-# http://creativecommons.org/licenses/by-sa/4.0/
+# SPDX-FileCopyrightText: Copyright 2009-2025 Remi Collet
+# SPDX-License-Identifier: CECILL-2.1
+# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
#
# Please, preserve the changelog entries
#
-# we don't want -z defs linker flag
-%undefine _strict_symbol_defs_build
-
%if 0%{?scl:1}
%global sub_prefix %{scl_prefix}
%scl_package php-pecl-memcached
@@ -21,57 +18,66 @@
%endif
%bcond_without fastlz
+%bcond_without zstd
%bcond_without igbinary
%bcond_without msgpack
%bcond_without tests
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
+%global pie_vend php-memcached
+%global pie_proj php-memcached
%global pecl_name memcached
# After 40-igbinary, 40-json, 40-msgpack
%global ini_name 50-%{pecl_name}.ini
-%global upstream_version 3.2.0
-#global upstream_prever RC2
+%global upstream_version 3.3.0
+#global upstream_prever RC1
# upstream use dev => alpha => beta => RC
# make RPM happy DEV => alpha => beta => rc
-#global upstream_lower rc2
+%global upstream_lower %(echo %{upstream_prever} | tr '[:upper:]' '[:lower:]')
+%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever}
+%global _configure ../%{sources}/configure
Summary: Extension to work with the Memcached caching daemon
-Name: %{?sub_prefix}php-pecl-memcached
+Name: %{?scl_prefix}php-pecl-memcached
Version: %{upstream_version}%{?upstream_prever:~%{upstream_lower}}
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-License: PHP
+Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+License: PHP-3.01
URL: https://pecl.php.net/package/%{pecl_name}
-Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
+Source0: https://pecl.php.net/get/%{sources}.tgz
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 7.0
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-json
%if %{with igbinary}
-BuildRequires: %{?sub_prefix}php-pecl-igbinary-devel
+BuildRequires: %{?scl_prefix}php-pecl-igbinary-devel
%endif
%if %{with msgpack}
-BuildRequires: %{?sub_prefix}php-pecl-msgpack-devel
+BuildRequires: %{?scl_prefix}php-pecl-msgpack-devel
%endif
BuildRequires: zlib-devel
BuildRequires: cyrus-sasl-devel
%if %{with fastlz}
BuildRequires: fastlz-devel
%endif
+%if %{with zstd}
+BuildRequires: libzstd-devel
+%endif
%if %{with tests}
BuildRequires: memcached
%endif
BuildRequires: pkgconfig(libevent) >= 2.0.2
-%if 0%{?rhel}
+%if 0%{?rhel} && 0%{?rhel} < 10
%global move_to_opt 1
BuildRequires: %{?vendeur:%{vendeur}-}libmemcached-awesome-devel >= 1.1
Requires: libevent%{?_isa}
Requires: fastlz%{?_isa}
Requires: zlib%{?_isa}
+Requires: libzstd%{?_isa}
Requires: cyrus-sasl-lib%{?_isa}
Requires: %{?vendeur:%{vendeur}-}libmemcached-awesome%{?_isa}
%else
@@ -83,61 +89,21 @@ Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
Requires: %{?scl_prefix}php-json%{?_isa}
%if %{with igbinary}
-Requires: %{?sub_prefix}php-igbinary%{?_isa}
+Requires: %{?scl_prefix}php-igbinary%{?_isa}
%endif
%if %{with msgpack}
-Requires: %{?sub_prefix}php-msgpack%{?_isa}
-%endif
-%{?_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 "%{?scl_prefix}" != "%{?sub_prefix}"
-Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release}
-Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
+Requires: %{?scl_prefix}php-msgpack%{?_isa}
%endif
-%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
-# Other third party repo stuff
-Obsoletes: php53-pecl-%{pecl_name} <= %{version}
-Obsoletes: php53u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php54-pecl-%{pecl_name} <= %{version}
-Obsoletes: php54w-pecl-%{pecl_name} <= %{version}
-Obsoletes: php55u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php55w-pecl-%{pecl_name} <= %{version}
-Obsoletes: php56u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php56w-pecl-%{pecl_name} <= %{version}
-Obsoletes: php70u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php70w-pecl-%{pecl_name} <= %{version}
-%if "%{php_version}" > "7.1"
-Obsoletes: php71u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php71w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.2"
-Obsoletes: php72u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php72w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.3"
-Obsoletes: php73-pecl-%{pecl_name} <= %{version}
-Obsoletes: php73w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.4"
-Obsoletes: php74-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "8.0"
-Obsoletes: php80-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "8.1"
-Obsoletes: php81-pecl-%{pecl_name} <= %{version}
-%endif
-%endif
+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}
+Provides: %{?scl_prefix}php-pie(%{pie_vend}/%{pie_proj}) = %{version}
%if %{move_to_opt}
-%{?filter_requires_in: %filter_requires_in %{_libdir}/.*\.so$}
+%global __requires_exclude_from ^%{_libdir}/.*$
%endif
-%{?filter_setup}
%description
@@ -155,14 +121,13 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -c -q
-mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS
# Don't install/register tests
sed -e 's/role="test"/role="src"/' \
- %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
+ -e '/LICENSE/s/role="doc"/role="src"/' \
-i package.xml
-cd NTS
+cd %{sources}
%if %{with fastlz}
rm -r fastlz
sed -e '/name=.fastlz/d' -i ../package.xml
@@ -198,10 +163,11 @@ extension=%{pecl_name}.so
EOF
# default options with description from upstream
-cat NTS/memcached.ini >>%{ini_name}
+cat %{sources}/memcached.ini >>%{ini_name}
+mkdir NTS
%if %{with_zts}
-cp -r NTS ZTS
+mkdir ZTS
%endif
@@ -230,18 +196,24 @@ peclconf() {
%if %{with fastlz}
--with-system-fastlz \
%endif
+%if %{with zstd}
+ --with-zstd \
+%endif
--with-php-config=$1
}
-cd NTS
-%{_bindir}/phpize
-peclconf %{_bindir}/php-config
-make %{?_smp_mflags}
+cd %{sources}
+%{__phpize}
+[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global
+sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL
+
+cd ../NTS
+peclconf %{__phpconfig}
+%make_build
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
-peclconf %{_bindir}/zts-php-config
-make %{?_smp_mflags}
+peclconf %{__ztsphpconfig}
+%make_build
%endif
@@ -249,7 +221,7 @@ make %{?_smp_mflags}
%{?dtsenable}
# Install the NTS extension
-make install -C NTS INSTALL_ROOT=%{buildroot}
+%make_install -C NTS
# Drop in the bit of configuration
# rename to z-memcached to be load after msgpack
@@ -260,44 +232,18 @@ install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
# Install the ZTS extension
%if %{with_zts}
-make install -C ZTS INSTALL_ROOT=%{buildroot}
+%make_install -C ZTS
install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
# Documentation
-cd NTS
+cd %{sources}
for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
-%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
-
-
%check
-%if "%{php_version}" < "7.3"
-# ::1:50770 vs [::1]:%s
-rm ?TS/tests/memcachedserver6.phpt
-%endif
-
-
OPT="-n"
[ -f %{php_extdir}/igbinary.so ] && OPT="$OPT -d extension=igbinary.so"
[ -f %{php_extdir}/json.so ] && OPT="$OPT -d extension=json.so"
@@ -306,46 +252,38 @@ OPT="-n"
: Minimal load test for NTS extension
%{__php} $OPT \
-d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
- --modules | grep %{pecl_name}
+ --modules | grep '^%{pecl_name}$'
%if %{with_zts}
: Minimal load test for ZTS extension
%{__ztsphp} $OPT \
-d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
- --modules | grep %{pecl_name}
+ --modules | grep '^%{pecl_name}$'
%endif
%if %{with tests}
+cd %{sources}
ret=0
+%if "%{php_version}" < "7.3"
+# ::1:50770 vs [::1]:%s
+rm tests/memcachedserver6.phpt
+%endif
+
: Launch the Memcached service
-port=$(%{__php} -r 'echo 10000 + PHP_MAJOR_VERSION*100 + PHP_MINOR_VERSION*10 + PHP_INT_SIZE + 0%{?scl:1};')
+port=$(%{__php} -r 'echo 10000 + PHP_MAJOR_VERSION*1000 + PHP_MINOR_VERSION*100 + PHP_INT_SIZE + 0%{?scl:10} + %{?fedora}%{?rhel};')
memcached -p $port -U $port -d -P $PWD/memcached.pid
-sed -e "s/11211/$port/" -i ?TS/tests/*
+sed -e "s/11211/$port/" -i tests/*
: Port for MemcachedServer
-port=$(%{__php} -r 'echo 11000 + PHP_MAJOR_VERSION*100 + PHP_MINOR_VERSION*10 + PHP_INT_SIZE + 0%{?scl:1};')
-sed -e "s/3434/$port/" -i ?TS/tests/*
+port=$(%{__php} -r 'echo 12000 + PHP_MAJOR_VERSION*1000 + PHP_MINOR_VERSION*100 + PHP_INT_SIZE + 0%{?scl:10} + %{?fedora}%{?rhel};')
+sed -e "s/3434/$port/" -i tests/*
: Run the upstream test Suite for NTS extension
-pushd NTS
TEST_PHP_EXECUTABLE=%{__php} \
-TEST_PHP_ARGS="$OPT -d extension=$PWD/modules/%{pecl_name}.so" \
-NO_INTERACTION=1 \
+TEST_PHP_ARGS="$OPT -d extension=$PWD/../NTS/modules/%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
-%{__php} -n run-tests.php -x --show-diff || ret=1
-popd
-
-%if %{with_zts}
-: Run the upstream test Suite for ZTS extension
-pushd ZTS
-TEST_PHP_EXECUTABLE=%{__ztsphp} \
-TEST_PHP_ARGS="$OPT -d extension=$PWD/modules/%{pecl_name}.so" \
-NO_INTERACTION=1 \
-REPORT_EXIT_STATUS=1 \
-%{__ztsphp} -n run-tests.php -x --show-diff || ret=1
-popd
-%endif
+%{__php} -n run-tests.php -q -x --show-diff || ret=1
# Cleanup
if [ -f memcached.pid ]; then
@@ -358,7 +296,7 @@ exit $ret
%files
-%{?_licensedir:%license NTS/LICENSE}
+%license %{sources}/LICENSE
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -372,6 +310,39 @@ exit $ret
%changelog
+* Mon Jul 7 2025 Remi Collet <remi@remirepo.net> - 3.3.0-2
+- re-license spec file to CECILL-2.1
+- add pie virtual provides
+
+* Fri Oct 18 2024 Remi Collet <remi@remirepo.net> - 3.3.0-1
+- update to 3.3.0
+
+* Fri Oct 4 2024 Remi Collet <remi@remirepo.net> - 3.3.0~RC1-1
+- update to 3.3.0RC1
+- enable zstd compression support
+
+* Tue Jan 30 2024 Remi Collet <remi@remirepo.net> - 3.2.0-9
+- fix incompatible pointer types using patch from
+ https://github.com/php-memcached-dev/php-memcached/pull/555
+
+* Wed Aug 30 2023 Remi Collet <remi@remirepo.net> - 3.2.0-7
+- rebuild for PHP 8.3.0RC1
+
+* Wed Jul 12 2023 Remi Collet <remi@remirepo.net> - 3.2.0-6
+- build out of sources tree
+
+* Fri Sep 9 2022 Remi Collet <remi@remirepo.net> - 3.2.0-5
+- rebuild for PHP 8.2 with msgpack and igbinary
+
+* Thu Sep 1 2022 Remi Collet <remi@remirepo.net> - 3.2.0-4
+- rebuild for PHP 8.2.0RC1
+
+* Thu Jul 28 2022 Remi Collet <remi@remirepo.net> - 3.2.0-3
+- more upstream patches for PHP 8.2
+
+* Fri Jun 3 2022 Remi Collet <remi@remirepo.net> - 3.2.0-2
+- add upstream patches for PHP 8.2
+
* Thu Mar 24 2022 Remi Collet <remi@remirepo.net> - 3.2.0-1
- update to 3.2.0