Skip to content

Commit 7937c7f

Browse files
committed
Merge in upstream changes from php7 branch of php-memcached GitHub project (e65be32; latest unstable, aka 3.0.0-devel)
2 parents 617a540 + e65be32 commit 7937c7f

File tree

137 files changed

+774
-718
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+774
-718
lines changed

.travis.yml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,36 @@
1+
sudo: required
2+
dist: trusty
3+
14
language: php
25
php:
36
- 7.0
7+
- 7.1
8+
9+
matrix:
10+
fast_finish: true
11+
allow_failures:
12+
- php: 7.1
413

514
env:
6-
- LIBMEMCACHED_VERSION=1.0.18
7-
- LIBMEMCACHED_VERSION=1.0.17
8-
- LIBMEMCACHED_VERSION=1.0.16
9-
- LIBMEMCACHED_VERSION=1.0.15
10-
- LIBMEMCACHED_VERSION=1.0.14
11-
- LIBMEMCACHED_VERSION=1.0.10
12-
- LIBMEMCACHED_VERSION=1.0.8
13-
- LIBMEMCACHED_VERSION=1.0.7
14-
- LIBMEMCACHED_VERSION=1.0.6
15-
- LIBMEMCACHED_VERSION=1.0.2
16-
#- LIBMEMCACHED_VERSION=0.53
17-
#- LIBMEMCACHED_VERSION=0.49
18-
#- LIBMEMCACHED_VERSION=0.44
15+
- LIBMEMCACHED_VERSION=1.0.18 # Debian Jessie / Ubuntu Xenial
16+
- LIBMEMCACHED_VERSION=1.0.16 # RHEL / CentOS 7
17+
- LIBMEMCACHED_VERSION=1.0.8 # Debian Wheezy / Ubuntu Trusty
18+
1919
addons:
2020
apt:
2121
packages:
2222
- sasl2-bin
2323
- libsasl2-dev
24+
- libevent-dev
2425

2526
before_script:
2627
- ./.travis/travis.sh before_script $LIBMEMCACHED_VERSION
2728

2829
script:
2930
- ./.travis/travis.sh script $LIBMEMCACHED_VERSION
3031

31-
sudo: false
32-
3332
cache:
3433
directories:
3534
- $HOME/cache
3635

37-
36+

.travis/travis.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ function install_libmemcached() {
6767
}
6868

6969
function install_igbinary() {
70-
git clone https://github.com/igbinary/igbinary7.git
71-
pushd igbinary7
70+
git clone https://github.com/igbinary/igbinary.git
71+
pushd igbinary
7272
phpize
7373
./configure
7474
make
@@ -79,7 +79,6 @@ function install_igbinary() {
7979
function install_msgpack() {
8080
git clone https://github.com/msgpack/msgpack-php.git
8181
pushd msgpack-php
82-
git checkout php7
8382
phpize
8483
./configure
8584
make
@@ -238,7 +237,7 @@ case $ACTION in
238237
# Install igbinary extension
239238
install_igbinary
240239

241-
# install msgpack
240+
# Install msgpack extension
242241
install_msgpack
243242

244243
install_memcached

ChangeLog

Lines changed: 45 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
memcached extension changelog
22

3-
Version 2.2.0b1
4-
---------------
3+
Version 2.2.0 (2014-04-01)
4+
--------------------------
5+
* Added the OPT_SERVER_TIMEOUT_LIMIT behaviour
6+
7+
Version 2.2.0RC1 (2014-03-12)
8+
-----------------------------
9+
* Added the OPT_SERVER_TIMEOUT_LIMIT behaviour
10+
* Fixes incorrect size when compressing serialized objects
11+
* Fixes endianess of compressed values
12+
13+
Version 2.2.0b1 (2013-10-28)
14+
----------------------------
515
* Reinstate support for libememcached 0.x series
616
* Added SASL support to session handler
717
* Added Memcached::flushBuffers as per GH #78
@@ -20,28 +30,28 @@ Version 2.2.0b1
2030
* Added Memcached::setBucket for virtual bucket support
2131
* Added support for msgpack serialization
2232
* Memcached::setSaslAuthData returns correct status on success
23-
* Added support for user-defined flags in set and get operations
33+
* Added support for user-defined flags in set and get operations
2434

25-
Version 2.1.0
26-
-------------
35+
Version 2.1.0 (2012-08-06)
36+
--------------------------
2737
* Drop support for libmemcached 0.x series, now 1.0.x is required
2838
* Add support for virtual bucket distribution
2939
* Fix compilation against PHP 5.2
3040

31-
Version 2.0.1
32-
-------------
41+
Version 2.0.1 (2012-03-03)
42+
--------------------------
3343
* Fix embedded version number to be not -dev
3444

35-
Version 2.0.0
36-
-------------
45+
Version 2.0.0 (2012-03-02)
46+
--------------------------
3747
* Add touch() and touchByKey() methods
3848
* Add resetServerList() and quit() methods
3949
* Support binary protocol in sessions
4050
* Make it work with libmemcached up to 1.0.4
4151
* Test against PHP 5.4.0
4252

43-
Version 2.0.0b2
44-
---------------
53+
Version 2.0.0b2 (2011-06-24)
54+
----------------------------
4555
* Add OPT_REMOVE_FAILED_SERVERS option.
4656
* Make it work with libmemcached up to 0.49.
4757
* Fix a case where invalid session ID could lock the script.
@@ -61,8 +71,8 @@ Version 2.0.0b2
6171
* Make increment/decrement initialize value when it is not available (when
6272
using binary protocol)
6373

64-
Version 2.0.0b1
65-
---------------
74+
Version 2.0.0b1 (2011-03-12)
75+
----------------------------
6676
* Add fastlz library that provides better/faster payload compression
6777
* Add configure switch to enable/disable JSON serialization support
6878
* Add getAllKeys() method
@@ -84,23 +94,27 @@ Version 2.0.0b1
8494
* Add 'on_new' callback to constructor
8595
* Add SASL support
8696

87-
Version 1.0.1
88-
-------------
97+
Version 1.0.2 (2010-05-03)
98+
--------------------------
99+
* Fix build for libmemcached-0.39 (memcached_server_list() issue)
100+
101+
Version 1.0.1 (2010-03-11)
102+
--------------------------
89103
* Fix JSON API handling to account for PHP 5.2/5.3 version differences.
90104
* Add memcached.sess_locking, memcached.sess_lock_wait, and
91105
memcached.sess_prefix INI entries.
92106
* Add OPT_AUTO_EJECT_HOSTS option.
93107

94-
Version 1.0.0
95-
-------------
108+
Version 1.0.0 (2009-07-04)
109+
--------------------------
96110
* First stable release.
97111
* Add getResultMessage() method.
98112
* Fix OPT_RECV_TIMEOUT definition.
99113
* Initialize Session lock wait to max execution time (if max execution
100114
time is unlimited, default to 30 seconds).
101115

102-
Version 0.2.0
103-
-------------
116+
Version 0.2.0 (2009-06-04)
117+
--------------------------
104118
* Add JSON serializer support, requires PHP 5.2.10+.
105119
* Add HAVE_JSON and HAVE_IGBINARY class constants that indicate
106120
whether the respective serializers are available.
@@ -114,25 +128,25 @@ Version 0.2.0
114128
the cache when upgrading to this version.
115129
* Add several tests.
116130

117-
Version 0.1.5
118-
-------------
131+
Version 0.1.5 (2009-03-31)
132+
--------------------------
119133
* Implement getVersion().
120134
* Add support for preserving boolean value types.
121135
* Fix crash when child class does not call constructor.
122136
* Fix bug #16084 (Crash when addServers is called with an associative array).
123137
* ZTS compilation fixes.
124138

125-
Version 0.1.4
126-
-------------
139+
Version 0.1.4 (2009-02-13)
140+
--------------------------
127141
* Fix compilation against PHP 5.3.
128142
* Add support for 'igbinary' serializer (Oleg Grenrus)
129143

130-
Version 0.1.3
131-
-------------
144+
Version 0.1.3 (2009-02-06)
145+
--------------------------
132146
* Bludgeon bug #15896 (Memcached setMulti error) into submission.
133147

134-
Version 0.1.2
135-
-------------
148+
Version 0.1.2 (2009-02-06)
149+
--------------------------
136150
* Fix bug #15896 (Memcached setMulti error).
137151
* Check for empty key in getServerByKey().
138152
* Allow passing 'null' for callbacks.
@@ -141,12 +155,12 @@ Version 0.1.2
141155
* Allow only strings as the append/prepend value.
142156
* Remove expiration parameter from append/prepend.
143157

144-
Version 0.1.1
145-
-------------
158+
Version 0.1.1 (2009-02-02)
159+
--------------------------
146160
* Add OPT_LIBKETAMA_COMPATIBLE option.
147161
* Implement addServers() method.
148162
* Swap internal compressed and serialized flags to be compatible with other clients.
149163

150-
Version 0.1.0
151-
-------------
164+
Version 0.1.0 (2009-01-29)
165+
--------------------------
152166
* Initial release

README.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,6 @@ Note: you can statically link the libmemcached library into the PHP binary so it
8383
* [Github link] (https://github.com/awslabs/aws-elasticache-cluster-client-memcached-for-php)
8484
* [AmazonElastiCache Auto Discovery](http://docs.amazonwebservices.com/AmazonElastiCache/latest/UserGuide/AutoDiscovery.html)
8585
* [php-memcached] (https://github.com/php-memcached-dev/php-memcached)
86-
* [libmemcached](http://tangent.org/552/libmemcached.html)
87-
* [memcached](http://www.danga.com/memcached/)
86+
* [libmemcached](http://libmemcached.org/libMemcached.html)
87+
* [memcached](http://memcached.org/)
8888
* [igbinary](https://github.com/igbinary/igbinary7)

memcached.ini

Lines changed: 56 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,17 @@ memcached.sess_locking = On
1212

1313
; The minimum time, in milliseconds, to wait between session lock attempts.
1414
; This value is double on each lock retry until memcached.sess_lock_wait_max
15-
; is reached
16-
memcached.sess_lock_wait_min = 0;
15+
; is reached, after which any further retries will take sess_lock_wait_max seconds.
16+
; Default is 1000.
17+
memcached.sess_lock_wait_min = 1000;
1718

1819
; The maximum time, in milliseconds, to wait between session lock attempts.
19-
memcached.sess_lock_wait_max = 0;
20+
; Default is 2000.
21+
memcached.sess_lock_wait_max = 2000;
22+
23+
; The number of times to retry locking the session lock, not including the first attempt.
24+
; Default is 5.
25+
memcached.sess_lock_retries = 5;
2026

2127
; The time, in seconds, before a lock should release itself.
2228
; Setting to 0 results in the default behaviour, which is to
@@ -29,16 +35,24 @@ memcached.sess_lock_expire = 0;
2935
; the default value is "memc.sess.key."
3036
memcached.sess_prefix = "memc.sess.key."
3137

38+
; Whether or not to re-use the memcached connections corresponding to the value(s)
39+
; of session.save_path after the execution of the script ends.
40+
; Don't use this if certain settings (e.g. SASL settings, sess_binary_protocol) would
41+
; be overridden between requests.
42+
; Default is Off.
43+
memcached.sess_persistent = Off
44+
3245
; memcached session consistent hash mode
3346
; if set to On, consistent hashing (libketama) is used
3447
; for session handling.
3548
; When consistent hashing is used, one can add or remove cache
3649
; node(s) without messing up too much with existing keys
37-
; default is Off
38-
memcached.sess_consistent_hash = Off
50+
; default is On
51+
memcached.sess_consistent_hash = On
3952

40-
; Allow failed memcached server to automatically be removed
41-
memcached.sess_remove_failed = 1
53+
; Allow failed memcached server to automatically be removed.
54+
; Default is Off. (In previous versions, this setting was called memcached.sess_remove_failed)
55+
memcached.sess_remove_failed_servers = Off
4256

4357
; Write data to a number of additional memcached servers
4458
; This is "poor man's HA" as libmemcached calls it.
@@ -49,15 +63,17 @@ memcached.sess_remove_failed = 1
4963
; which could have old data or no data at all
5064
memcached.sess_number_of_replicas = 0
5165

52-
; memcached session binary mode
53-
; libmemcached replicas only work if binary mode is enabled
54-
memcached.sess_binary = Off
66+
; Use the memcached binary protocol for memcached sessions (Instead of the text protocol)
67+
; libmemcached replicas work only if binary mode is enabled.
68+
; However, certain proxies (such as twemproxy) will work only if the binary protocol is disabled.
69+
; Default is On. In older versions of php-memcached, this setting was Off and was called memcached.sess_binary.
70+
memcached.sess_binary_protocol = On
5571

5672
; memcached session replica read randomize
5773
memcached.sess_randomize_replica_read = Off
5874

5975
; memcached connect timeout value
60-
; In non-blocking mode this changes the value of the timeout
76+
; In non-blocking mode this changes the value of the timeout
6177
; during socket connection in milliseconds. Specifying -1 means an infinite timeout.
6278
memcached.sess_connect_timeout = 1000
6379

@@ -111,3 +127,32 @@ memcached.serializer = "igbinary"
111127
; environment.
112128
; the default is 2
113129
memcached.store_retry_count = 2
130+
131+
; Sets the default for consistent hashing for new connections.
132+
; (To configure consistent hashing for session connections,
133+
; use memcached.sess_consistent_hash instead)
134+
;
135+
; If set to On, consistent hashing (libketama) is used
136+
; for session handling.
137+
; When consistent hashing is used, one can add or remove cache
138+
; node(s) without messing up too much with existing keys
139+
; default is Off
140+
memcached.default_consistent_hash = Off
141+
142+
; Sets the default memcached protocol for new connections.
143+
; (To configure the memcached protocol for connections used by sessions,
144+
; use memcached.sess_binary_protocol instead)
145+
;
146+
; If set to On, the memcached binary protocol is used by default.
147+
; If set to Off, the memcached text protocol is used.
148+
; Default is Off
149+
memcached.default_binary_protocol = Off
150+
151+
; Sets the default memcached connection timeout for new connections.
152+
; (To configure the memcached connection timeout for sessions,
153+
; use memcached.sess_connect_timeout instead)
154+
; In non-blocking mode this changes the value of the timeout.
155+
; during socket connection in milliseconds. Specifying -1 means an infinite timeout.
156+
; Specifying 0 means using the memcached library's default connection timeout.
157+
; Default is 0.
158+
memcached.default_connect_timeout = 0

0 commit comments

Comments
 (0)