Skip to content

Commit e090f05

Browse files
ZaffyTysonAndretomassrnka
authored
More work on pecl-memcache (#76)
* Use zend_bool for ini bool settings Related to #56 * Initial work for php 8 * php7 -> php8 * Add test for #53 * Fix support for binary protocol * php8 -> src * Backwards compatibility with php 7.3, 7.4 This will allow us to have one unified branch that will compile under different versions of php. * Add test for pecl bug #77900 * Fix some memory leaks * Support for reflection - added / updated arginfos - fix functions returning NULL instead of advertised return type, For example, when memcached returned error on "delete", function returned null instead of false - added tests for both php8 and 7 * Fix typo * Update config.w32 Co-authored-by: Tyson Andre <tyson.andre@uwaterloo.ca> Co-authored-by: Tyson Andre <tysonandre775@hotmail.com> Co-authored-by: Tomas Srnka <tomassrnka@users.noreply.github.com> Co-authored-by: Tyson Andre <tyson.andre@uwaterloo.ca>
1 parent 7889bd1 commit e090f05

34 files changed

+2317
-162
lines changed

config.w32

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ if (PHP_MEMCACHE != "no") {
99
var dll = get_define('PHPDLL');
1010
var old_conf_dir = configure_module_dirname;
1111

12-
if (dll.match(/^php8/) != null) {
13-
configure_module_dirname = configure_module_dirname + "\\php8";
12+
if (dll.match(/^php[78]/) != null) {
13+
configure_module_dirname = configure_module_dirname + "\\src";
1414
} else if (dll.match(/^php5/) != null) {
1515
ERROR("PHP 7.x required for pecl-php-memcache ver 4+. Use pecl-php-meachce ver 3.x for PHP 5.x.");
1616
} else {

config9.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ if test "$PHP_MEMCACHE" != "no"; then
6464
fi
6565

6666
AC_MSG_CHECKING(PHP version)
67-
if test -d $abs_srcdir/php8 ; then
67+
if test -d $abs_srcdir/src ; then
6868
dnl # only when for PECL, not for PHP
6969
export OLD_CPPFLAGS="$CPPFLAGS"
7070
export CPPFLAGS="$CPPFLAGS $INCLUDES"
@@ -73,7 +73,7 @@ if test "$PHP_MEMCACHE" != "no"; then
7373
#error "PHP < 7"
7474
#endif
7575
], [
76-
subdir=php8
76+
subdir=src
7777
AC_MSG_RESULT([PHP 7.x])
7878
],
7979
AC_MSG_ERROR([PHP 7.x required for pecl-php-memcache ver 4+. Use pecl-php-memcache ver 3.x for PHP 5.x.])

docker/start.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,8 @@ chown memcache:memcache /var/run/memcached
2929

3030
# Let's start tests
3131
cd /usr/src/pecl-memcache
32-
NO_INTERACTION=1 TEST_PHP_ARGS="--show-diff --keep-all -w fails.log" make test
32+
export NO_INTERACTION=1
33+
export TEST_PHP_ARGS="--show-diff --keep-all -w fails.log"
34+
35+
MEMCACHE_PROTOCOL=ascii make test
36+
MEMCACHE_PROTOCOL=binary make test

package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
6666
<file name="host.conf" role="src" />
6767
<file name="start.sh" role="src" />
6868
</dir>
69-
<dir name="php8">
69+
<dir name="src">
7070
<file name="memcache.c" role="src" />
7171
<file name="memcache_pool.c" role="src" />
7272
<file name="memcache_queue.c" role="src" />

0 commit comments

Comments
 (0)