diff options
author | Remi Collet <fedora@famillecollet.com> | 2017-02-13 07:48:15 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2017-02-13 07:48:15 +0100 |
commit | edd2a458592e389378aa5bdb082b6886ac001bb7 (patch) | |
tree | 23c90c0b6ee4c14a20bee581509f47238b259152 | |
parent | 86ef2bd436be92be6c26cfe2366ee37ceba2f12d (diff) |
php-pecl-memcached: 3.0.2 (php 7, stable)
-rw-r--r-- | REFLECTION-PHP7 | 2 | ||||
-rw-r--r-- | incrdecr_64.phpt | 39 | ||||
-rw-r--r-- | incrdecr_bykey_64.phpt | 69 | ||||
-rw-r--r-- | memcached-pr319.patch | 79 | ||||
-rw-r--r-- | php-pecl-memcached-php7.spec | 15 | ||||
-rw-r--r-- | skipif.inc | 16 |
6 files changed, 6 insertions, 214 deletions
diff --git a/REFLECTION-PHP7 b/REFLECTION-PHP7 index 5bf1038..2a44188 100644 --- a/REFLECTION-PHP7 +++ b/REFLECTION-PHP7 @@ -1,4 +1,4 @@ -Extension [ <persistent> extension #166 memcached version 3.0.1 ] { +Extension [ <persistent> extension #167 memcached version 3.0.2 ] { - Dependencies { Dependency [ session (Required) ] diff --git a/incrdecr_64.phpt b/incrdecr_64.phpt deleted file mode 100644 index dfa32c6..0000000 --- a/incrdecr_64.phpt +++ /dev/null @@ -1,39 +0,0 @@ ---TEST-- -64-bit Memcached::increment() decrement() incrementByKey() decrementByKey() ---SKIPIF-- -<?php -include "skipif.inc"; -if (PHP_INT_SIZE < 8) die("skip valid for 64-bit PHP only"); -?> ---FILE-- -<?php -include dirname (__FILE__) . '/config.inc'; -$m = memc_get_instance (); - -echo "Normal\n"; -$m->set('foo', 1); -var_dump($m->get('foo')); - -echo "Enormous offset 64-bit\n"; -$m->increment('foo', 0x100000000); -var_dump($m->get('foo')); - -$m->decrement('foo', 0x100000000); -var_dump($m->get('foo')); - -echo "Enormous offset 64-bit by key\n"; -$m->incrementByKey('foo', 'foo', 0x100000000); -var_dump($m->get('foo')); - -$m->decrementByKey('foo', 'foo', 0x100000000); -var_dump($m->get('foo')); - ---EXPECT-- -Normal -int(1) -Enormous offset 64-bit -int(4294967297) -int(1) -Enormous offset 64-bit by key -int(4294967297) -int(1) diff --git a/incrdecr_bykey_64.phpt b/incrdecr_bykey_64.phpt deleted file mode 100644 index b1f2e4d..0000000 --- a/incrdecr_bykey_64.phpt +++ /dev/null @@ -1,69 +0,0 @@ ---TEST-- -Memcached::incrementByKey() Memcached::decrementByKey() on 64bits ---SKIPIF-- -<?php -include "skipif.inc"; -if (PHP_INT_SIZE < 8) die("skip valid for 64-bit only"); -?> ---FILE-- -<?php -include dirname (__FILE__) . '/config.inc'; -$m = memc_get_instance (); - -echo "Not there\n"; -$m->delete('foo'); -var_dump($m->incrementByKey('foo', 'foo', 1)); -var_dump($m->decrementByKey('foo', 'foo', 1)); -var_dump($m->get('foo')); - -echo "Normal\n"; -$m->set('foo', 1); -var_dump($m->get('foo')); -$m->incrementByKey('foo', 'foo'); -var_dump($m->get('foo')); -$m->incrementByKey('foo', 'foo', 2); -var_dump($m->get('foo')); -$m->decrementByKey('foo', 'foo'); -var_dump($m->get('foo')); -$m->decrementByKey('foo', 'foo', 2); -var_dump($m->get('foo')); - -error_reporting(0); - -echo "Negative offset\n"; -$php_errormsg = ''; -$m->incrementByKey('foo', 'foo', -1); -echo $php_errormsg, "\n"; -var_dump($m->get('foo')); - -$php_errormsg = ''; -$m->decrementByKey('foo', 'foo', -1); -echo $php_errormsg, "\n"; -var_dump($m->get('foo')); - -echo "Enormous offset\n"; -$m->incrementByKey('foo', 'foo', 4294967296); -var_dump($m->get('foo')); - -$m->decrementByKey('foo', 'foo', 4294967296); -var_dump($m->get('foo')); - ---EXPECT-- -Not there -bool(false) -bool(false) -bool(false) -Normal -int(1) -int(2) -int(4) -int(3) -int(1) -Negative offset -Memcached::incrementByKey(): offset cannot be a negative value -int(1) -Memcached::decrementByKey(): offset cannot be a negative value -int(1) -Enormous offset -int(4294967297) -int(1) diff --git a/memcached-pr319.patch b/memcached-pr319.patch deleted file mode 100644 index 6c6ec15..0000000 --- a/memcached-pr319.patch +++ /dev/null @@ -1,79 +0,0 @@ -From f8fd6228e34e1b49947890b060a501a6eab6978c Mon Sep 17 00:00:00 2001 -From: Remi Collet <fedora@famillecollet.com> -Date: Thu, 9 Feb 2017 07:24:15 +0100 -Subject: [PATCH] ensure tests are ok for 32bits build - ---- - tests/gh_90.phpt | 4 ++-- - tests/incrdecr.phpt | 6 +++--- - tests/incrdecr_bykey.phpt | 6 +++--- - 3 files changed, 8 insertions(+), 8 deletions(-) - -diff --git a/tests/gh_90.phpt b/tests/gh_90.phpt -index 733b761..2a16f60 100644 ---- a/tests/gh_90.phpt -+++ b/tests/gh_90.phpt -@@ -12,7 +12,7 @@ $memcached = memc_get_instance (array ( - // Create a key for use as a lock. If this key already exists, wait till it doesn't exist. - { - $key = 'LockKey'; -- $lockToken = mt_rand(0, pow(2, 32)); //Random value betwen 0 and 2^32 for ownership verification -+ $lockToken = mt_rand(0, mt_getrandmax()); //Random value for ownership verification - - while (true) - { -@@ -88,4 +88,4 @@ array(10) { - int(1) - ["9_%s"]=> - int(1) --} -\ No newline at end of file -+} -diff --git a/tests/incrdecr.phpt b/tests/incrdecr.phpt -index cb3914a..b4e9469 100644 ---- a/tests/incrdecr.phpt -+++ b/tests/incrdecr.phpt -@@ -42,10 +42,10 @@ echo $php_errormsg, "\n"; - var_dump($m->get('foo')); - - echo "Enormous offset\n"; --$m->increment('foo', 4294967296); -+$m->increment('foo', 0x7f000000); - var_dump($m->get('foo')); - --$m->decrement('foo', 4294967296); -+$m->decrement('foo', 0x7f000000); - var_dump($m->get('foo')); - - --EXPECT-- -@@ -68,5 +68,5 @@ int(1) - Memcached::decrement(): offset cannot be a negative value - int(1) - Enormous offset --int(4294967297) -+int(2130706433) - int(1) -diff --git a/tests/incrdecr_bykey.phpt b/tests/incrdecr_bykey.phpt -index 809f3b8..8b931fa 100644 ---- a/tests/incrdecr_bykey.phpt -+++ b/tests/incrdecr_bykey.phpt -@@ -39,10 +39,10 @@ echo $php_errormsg, "\n"; - var_dump($m->get('foo')); - - echo "Enormous offset\n"; --$m->incrementByKey('foo', 'foo', 4294967296); -+$m->incrementByKey('foo', 'foo', 0x7f000000); - var_dump($m->get('foo')); - --$m->decrementByKey('foo', 'foo', 4294967296); -+$m->decrementByKey('foo', 'foo', 0x7f000000); - var_dump($m->get('foo')); - - --EXPECT-- -@@ -62,5 +62,5 @@ int(1) - Memcached::decrementByKey(): offset cannot be a negative value - int(1) - Enormous offset --int(4294967297) -+int(2130706433) - int(1) diff --git a/php-pecl-memcached-php7.spec b/php-pecl-memcached-php7.spec index bdd3b98..4e5181c 100644 --- a/php-pecl-memcached-php7.spec +++ b/php-pecl-memcached-php7.spec @@ -26,19 +26,13 @@ Summary: Extension to work with the Memcached caching daemon Name: %{?sub_prefix}php-pecl-memcached -Version: 3.0.1 -Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Version: 3.0.2 +Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: PHP Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz -Source1: skipif.inc -Source2: incrdecr_64.phpt -Source3: incrdecr_bykey_64.phpt - -# https://github.com/php-memcached-dev/php-memcached/pull/319 -Patch0: %{pecl_name}-pr319.patch BuildRequires: %{?scl_prefix}php-devel >= 7 BuildRequires: %{?scl_prefix}php-pear @@ -136,8 +130,6 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS -cp %{SOURCE1} %{SOURCE2} %{SOURCE3} tests/ -%patch0 -p1 -b .pr319 %if %{with_fastlz} rm -r fastlz @@ -341,6 +333,9 @@ exit $ret %changelog +* Mon Feb 13 2017 Remi Collet <remi@fedoraproject.org> - 3.0.2-1 +- update to 3.0.2 (php 7, stable) + * Thu Feb 9 2017 Remi Collet <remi@fedoraproject.org> - 3.0.1-3 - test build for https://github.com/php-memcached-dev/php-memcached/pull/320 diff --git a/skipif.inc b/skipif.inc deleted file mode 100644 index 9ef73b0..0000000 --- a/skipif.inc +++ /dev/null @@ -1,16 +0,0 @@ -<?php -if (!extension_loaded("memcached")) { - die("skip memcached is not loaded\n"); -} - -include dirname(__FILE__) . "/config.inc"; - -if (($m = memc_get_instance()) === NULL) { - die ("skip can not connect to server\n"); -} - -if (isset($min_version)) { - if (version_compare(memc_get_version($m), $min_version, "<")) { - die("skip version of server pool is too old, $min_version is required\n"); - } -} |