summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--PHPINFO2
-rw-r--r--REFLECTION59
-rw-r--r--php-pecl-yac.spec157
4 files changed, 113 insertions, 107 deletions
diff --git a/.gitignore b/.gitignore
index 1ab5c4f..01f0400 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,7 @@
+clog
package-*.xml
*.tgz
+*.tar.bz2
*.tar.gz
*.tar.xz
*.tar.xz.asc
diff --git a/PHPINFO b/PHPINFO
index 5af536f..449f54b 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,7 +2,7 @@
yac
yac support => enabled
-Version => 2.2.0
+Version => 2.3.1
Shared Memory => mmap
Serializer => php, msgpack, igbinary, json
diff --git a/REFLECTION b/REFLECTION
index a7b3b62..c6ce10c 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #112 yac version 2.2.0 ] {
+Extension [ <persistent> extension #119 yac version 2.3.1 ] {
- Dependencies {
Dependency [ msgpack (Required) ]
@@ -31,7 +31,7 @@ Extension [ <persistent> extension #112 yac version 2.2.0 ] {
}
- Constants [9] {
- Constant [ string YAC_VERSION ] { 2.2.0 }
+ Constant [ string YAC_VERSION ] { 2.3.1 }
Constant [ int YAC_MAX_KEY_LEN ] { 48 }
Constant [ int YAC_MAX_VALUE_RAW_LEN ] { 67108863 }
Constant [ int YAC_MAX_RAW_COMPRESSED_LEN ] { 1048576 }
@@ -43,7 +43,7 @@ Extension [ <persistent> extension #112 yac version 2.2.0 ] {
}
- Classes [1] {
- Class [ <internal:yac> class Yac ] {
+ Class [ <internal:yac> final class Yac ] {
- Constants [0] {
}
@@ -54,82 +54,75 @@ Extension [ <persistent> extension #112 yac version 2.2.0 ] {
- Static methods [0] {
}
- - Properties [1] {
- Property [ <default> protected $_prefix ]
+ - Properties [0] {
}
- - Methods [10] {
+ - Methods [8] {
Method [ <internal:yac, ctor> public method __construct ] {
- Parameters [1] {
- Parameter #0 [ <optional> $prefix ]
+ Parameter #0 [ <optional> string $prefix = "" ]
}
}
Method [ <internal:yac> public method add ] {
- Parameters [3] {
- Parameter #0 [ <required> $keys ]
- Parameter #1 [ <optional> $value ]
- Parameter #2 [ <optional> $ttl ]
+ Parameter #0 [ <required> array|string $key ]
+ Parameter #1 [ <required> mixed $value ]
+ Parameter #2 [ <optional> int $ttl = 0 ]
}
+ - Return [ ?bool ]
}
Method [ <internal:yac> public method set ] {
- Parameters [3] {
- Parameter #0 [ <required> $keys ]
- Parameter #1 [ <optional> $value ]
- Parameter #2 [ <optional> $ttl ]
- }
- }
-
- Method [ <internal:yac> public method __set ] {
-
- - Parameters [2] {
- Parameter #0 [ <required> $key ]
- Parameter #1 [ <required> $value ]
+ Parameter #0 [ <required> array|string $key ]
+ Parameter #1 [ <required> mixed $value ]
+ Parameter #2 [ <optional> int $ttl = 0 ]
}
+ - Return [ ?bool ]
}
Method [ <internal:yac> public method get ] {
- - Parameters [1] {
- Parameter #0 [ <required> $keys ]
- }
- }
-
- Method [ <internal:yac> public method __get ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> $key ]
+ - Parameters [2] {
+ Parameter #0 [ <required> array|string $key ]
+ Parameter #1 [ <optional> mixed &$cas = NULL ]
}
+ - Return [ ?bool ]
}
Method [ <internal:yac> public method delete ] {
- Parameters [2] {
- Parameter #0 [ <required> $keys ]
- Parameter #1 [ <optional> $ttl ]
+ Parameter #0 [ <required> array|string $key ]
+ Parameter #1 [ <optional> int $delay = 0 ]
}
+ - Return [ ?bool ]
}
Method [ <internal:yac> public method flush ] {
- Parameters [0] {
}
+ - Return [ bool ]
}
Method [ <internal:yac> public method info ] {
- Parameters [0] {
}
+ - Return [ array ]
}
Method [ <internal:yac> public method dump ] {
- - Parameters [0] {
+ - Parameters [1] {
+ Parameter #0 [ <optional> int $limit = 0 ]
}
+ - Return [ ?array ]
}
}
}
diff --git a/php-pecl-yac.spec b/php-pecl-yac.spec
index 59708ab..3367713 100644
--- a/php-pecl-yac.spec
+++ b/php-pecl-yac.spec
@@ -3,16 +3,19 @@
#
# Fedora spec file for php-pecl-yac (previously php-yac)
#
-# Copyright (c) 2013-2020 Remi Collet
-# License: CC-BY-SA
+# Copyright (c) 2013-2023 Remi Collet
+# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
-%if 0%{?scl:1}
-%global sub_prefix %{scl_prefix}
-%scl_package php-pecl-yac
-%endif
+%{?scl:%scl_package php-pecl-yac}
+
+# use system library by default
+%bcond_without fastlz
+
+# run test suite by default
+%bcond_without tests
%global gh_commit 7e5a9edfcfb6ad064c165a0b6abf8d11218fe4b5
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
@@ -21,32 +24,36 @@
#global gh_date 20150908
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global pecl_name yac
-%global with_tests %{!?_without_tests:1}%{?_without_tests:0}
# after 20-json, 40-igbinary and 40-msgpack
%global ini_name 50-%{pecl_name}.ini
-%global with_fastlz 1
+%if 0%{?gh_date:1}
+%global sources %{gh_project}-%{gh_commit}
+%else
+%global sources %{pecl_name}-%{version}
+%endif
+%global _configure ../%{sources}/configure
Summary: Lockless user data cache
-Name: %{?sub_prefix}php-pecl-%{pecl_name}
-Version: 2.2.0
+Name: %{?scl_prefix}php-pecl-%{pecl_name}
+Version: 2.3.1
+License: PHP-3.01
+URL: https://pecl.php.net/package/%{pecl_name}
%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;')}}
+Release: 0.15.%{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
%else
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 7%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
%endif
-License: PHP
-URL: https://pecl.php.net/package/%{pecl_name}
-
+BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
-BuildRequires: %{?scl_prefix}php-devel > 7
+BuildRequires: %{?scl_prefix}php-devel >= 7.0
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-json
BuildRequires: %{?scl_prefix}php-pecl-msgpack-devel
BuildRequires: %{?scl_prefix}php-pecl-igbinary-devel
-%if %{with_fastlz}
+%if %{with fastlz}
BuildRequires: fastlz-devel
%endif
@@ -55,7 +62,6 @@ 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
Obsoletes: %{?scl_prefix}php-%{pecl_name} < %{version}
@@ -63,32 +69,6 @@ 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}
-%endif
-
-%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
-# Other third party repo stuff
-%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}
-Obsoletes: php74w-pecl-%{pecl_name} <= %{version}
-%endif
-%endif
-
-%if 0%{?fedora} < 20 && 0%{?rhel} < 7
-# Filter private shared object
-%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$}
-%{?filter_setup}
-%endif
%description
@@ -107,10 +87,7 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -qc
%if 0%{?gh_date:1}
-mv %{gh_project}-%{gh_commit} NTS
-mv NTS/package.xml .
-%else
-mv %{pecl_name}-%{version} NTS
+mv %{sources}/package.xml .
%endif
# Don't install (register) the tests
@@ -118,8 +95,8 @@ sed -e 's/role="test"/role="src"/' \
%{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
-i package.xml
-cd NTS
-%if %{with_fastlz}
+cd %{sources}
+%if %{with fastlz}
sed -e '\:name="compressor/fastlz:d' -i ../package.xml
rm -r compressor/fastlz
%endif
@@ -147,9 +124,9 @@ extension = %{pecl_name}.so
EOF
+mkdir NTS
%if %{with_zts}
-# duplicate for ZTS build
-cp -pr NTS ZTS
+mkdir ZTS
%endif
@@ -158,24 +135,25 @@ cp -pr NTS ZTS
peclconf() {
%configure \
-%if %{with_fastlz}
--enable-json \
--enable-msgpack \
--enable-igbinary \
+%if %{with fastlz}
--with-system-fastlz \
%endif
--with-php-config=$1
}
-cd NTS
+cd %{sources}
%{_bindir}/phpize
-peclconf %{_bindir}/php-config
+
+cd ../NTS
+peclconf %{__phpconfig}
make %{?_smp_mflags}
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
-peclconf %{_bindir}/zts-php-config
+peclconf %{__ztsphpconfig}
make %{?_smp_mflags}
%endif
@@ -198,44 +176,44 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
# Documentation
for i in README.md $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//')
-do [ -f NTS/$i ] && install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
+do [ -f %{sources}/$i ] && install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
%check
-cd NTS
-OPTS="-n -d extension=json.so -d extension=igbinary.so -d extension=msgpack.so"
+cd %{sources}
+OPTS="-n"
+[ -f %{php_extdir}/json.so ] && OPTS="$OPTS -d extension=json.so"
+[ -f %{php_extdir}/igbinary.so ] && OPTS="$OPTS -d extension=igbinary.so"
+[ -f %{php_extdir}/msgpack.so ] && OPTS="$OPTS -d extension=msgpack.so"
+
: Minimal load test for NTS extension
%{_bindir}/php $OPTS \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
- --modules | grep %{pecl_name}
+ --modules | grep '^%{pecl_name}$'
-%if %{with_tests}
+%if %{with tests}
: Upstream test suite for NTS extension
TEST_PHP_EXECUTABLE=%{__php} \
-TEST_PHP_ARGS="$OPTS -d extension=$PWD/modules/%{pecl_name}.so" \
-NO_INTERACTION=1 \
+TEST_PHP_ARGS="$OPTS -d extension=$PWD/../NTS/modules/%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
-%{__php} -n run-tests.php --show-diff
+%{__php} -n run-tests.php -q --show-diff
%else
: Upstream test suite disabled
%endif
%if %{with_zts}
-cd ../ZTS
-
: Minimal load test for ZTS extension
%{__ztsphp} $OPTS \
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
- --modules | grep %{pecl_name}
+ --modules | grep '^%{pecl_name}$'
-%if %{with_tests}
+%if %{with tests}
: Upstream test suite for ZTS extension
TEST_PHP_EXECUTABLE=%{__ztsphp} \
-TEST_PHP_ARGS="$OPTS -d extension=$PWD/modules/%{pecl_name}.so" \
-NO_INTERACTION=1 \
+TEST_PHP_ARGS="$OPTS -d extension=$PWD/../ZTS/modules/%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
-%{__ztsphp} -n run-tests.php --show-diff
+%{__ztsphp} -n run-tests.php -q --show-diff
%else
: Upstream test suite disabled
%endif
@@ -263,7 +241,7 @@ fi
%files
-%{?_licensedir:%license NTS/LICENSE}
+%{?_licensedir:%license %{sources}/LICENSE}
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -277,6 +255,39 @@ fi
%changelog
+* Wed Aug 30 2023 Remi Collet <remi@remirepo.net> - 2.3.1-7
+- rebuild for PHP 8.3.0RC1
+
+* Tue Jul 18 2023 Remi Collet <remi@remirepo.net> - 2.3.1-6
+- build out of sources tree
+
+* Mon Dec 20 2021 Remi Collet <remi@remirepo.net> - 2.3.1-5
+- update to 2.3.1
+- drop patch merged upstream
+
+* Wed Sep 01 2021 Remi Collet <remi@remirepo.net> - 2.3.0-5
+- rebuild for 8.1.0RC1
+
+* Wed Aug 4 2021 Remi Collet <remi@remirepo.net> - 2.3.0-4
+- add patch for test suite with 8.1.0beta2 from
+ https://github.com/laruence/yac/pull/120
+
+* Fri Apr 30 2021 Remi Collet <remi@remirepo.net> - 2.3.0-3
+- F34 rebuild for https://github.com/remicollet/remirepo/issues/174
+
+* Wed Jan 6 2021 Remi Collet <remi@remirepo.net> - 2.3.0-1
+- update to 2.3.0
+
+* Wed Sep 30 2020 Remi Collet <remi@remirepo.net> - 2.2.1-3
+- rebuild for PHP 8.0.0RC1
+
+* Wed Sep 23 2020 Remi Collet <remi@remirepo.net> - 2.2.1-2
+- add patch for PHP 8 from
+ https://github.com/laruence/yac/pull/115
+
+* Fri May 15 2020 Remi Collet <remi@remirepo.net> - 2.2.1-1
+- update to 2.2.1
+
* Tue Mar 31 2020 Remi Collet <remi@remirepo.net> - 2.2.0-1
- update to 2.2.0
- enable json, igbinary and msgpack serializers