Skip to content

Commit

Permalink
More work on pecl-memcache (#76)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

Co-authored-by: Tyson Andre <[email protected]>
Co-authored-by: Tomas Srnka <[email protected]>
Co-authored-by: Tyson Andre <[email protected]>
  • Loading branch information
4 people authored Oct 16, 2020
1 parent 7889bd1 commit e090f05
Show file tree
Hide file tree
Showing 34 changed files with 2,317 additions and 162 deletions.
4 changes: 2 additions & 2 deletions config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ if (PHP_MEMCACHE != "no") {
var dll = get_define('PHPDLL');
var old_conf_dir = configure_module_dirname;

if (dll.match(/^php8/) != null) {
configure_module_dirname = configure_module_dirname + "\\php8";
if (dll.match(/^php[78]/) != null) {
configure_module_dirname = configure_module_dirname + "\\src";
} else if (dll.match(/^php5/) != null) {
ERROR("PHP 7.x required for pecl-php-memcache ver 4+. Use pecl-php-meachce ver 3.x for PHP 5.x.");
} else {
Expand Down
4 changes: 2 additions & 2 deletions config9.m4
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ if test "$PHP_MEMCACHE" != "no"; then
fi

AC_MSG_CHECKING(PHP version)
if test -d $abs_srcdir/php8 ; then
if test -d $abs_srcdir/src ; then
dnl # only when for PECL, not for PHP
export OLD_CPPFLAGS="$CPPFLAGS"
export CPPFLAGS="$CPPFLAGS $INCLUDES"
Expand All @@ -73,7 +73,7 @@ if test "$PHP_MEMCACHE" != "no"; then
#error "PHP < 7"
#endif
], [
subdir=php8
subdir=src
AC_MSG_RESULT([PHP 7.x])
],
AC_MSG_ERROR([PHP 7.x required for pecl-php-memcache ver 4+. Use pecl-php-memcache ver 3.x for PHP 5.x.])
Expand Down
6 changes: 5 additions & 1 deletion docker/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,8 @@ chown memcache:memcache /var/run/memcached

# Let's start tests
cd /usr/src/pecl-memcache
NO_INTERACTION=1 TEST_PHP_ARGS="--show-diff --keep-all -w fails.log" make test
export NO_INTERACTION=1
export TEST_PHP_ARGS="--show-diff --keep-all -w fails.log"

MEMCACHE_PROTOCOL=ascii make test
MEMCACHE_PROTOCOL=binary make test
2 changes: 1 addition & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
<file name="host.conf" role="src" />
<file name="start.sh" role="src" />
</dir>
<dir name="php8">
<dir name="src">
<file name="memcache.c" role="src" />
<file name="memcache_pool.c" role="src" />
<file name="memcache_queue.c" role="src" />
Expand Down
Loading

0 comments on commit e090f05

Please sign in to comment.