V3.0.2 Installation Fails on PHP7.1

Hi,
I tried to install the php sdk as follows:
#(Env: Debian 9, PHP 7.1, Libcouchbase3, desired php SDK: 3.02)

apt-get install php7.1-dev gnupg2
wget https://packages.couchbase.com/clients/c/repos/deb/couchbase.key
apt-key add couchbase.key
echo "deb https://packages.couchbase.com/clients/c/repos/deb/debian9 stretch stretch/main" > /etc/apt/sources.list.d/couchbase.list
apt-get update
apt-get install libcouchbase3 libcouchbase-dev libcouchbase3-tools libcouchbase3-libevent libcouchbase3-libev
pecl channel-update pecl.php.net
pecl install https://packages.couchbase.com/clients/php/couchbase-3.0.2.tgz

But I get this error:

/tmp/pear/temp/couchbase/exception.c:74:72: error: macro "ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO" requires 4 arguments, but only 3 given
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO(ai_BaseException_ref, IS_STRING, 1)
                                                                        ^
In file included from /usr/include/php/20160303/main/php.h:40:0,
                 from /tmp/pear/temp/couchbase/couchbase.h:25,
                 from /tmp/pear/temp/couchbase/exception.c:17:
/usr/include/php/20160303/Zend/zend_API.h:120:30: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘}’ token
 #define ZEND_END_ARG_INFO()  };
                              ^
/tmp/pear/temp/couchbase/exception.c:75:1: note: in expansion of macro ‘ZEND_END_ARG_INFO’
 ZEND_END_ARG_INFO()
 ^~~~~~~~~~~~~~~~~
/tmp/pear/temp/couchbase/exception.c:77:76: error: macro "ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO" requires 4 arguments, but only 3 given
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO(ai_BaseException_context, IS_OBJECT, 1)
                                                                            ^
In file included from /usr/include/php/20160303/main/php.h:40:0,
                 from /tmp/pear/temp/couchbase/couchbase.h:25,
                 from /tmp/pear/temp/couchbase/exception.c:17:
/usr/include/php/20160303/Zend/zend_API.h:120:30: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘}’ token
 #define ZEND_END_ARG_INFO()  };
                              ^
/tmp/pear/temp/couchbase/exception.c:78:1: note: in expansion of macro ‘ZEND_END_ARG_INFO’
 ZEND_END_ARG_INFO()
 ^~~~~~~~~~~~~~~~~
In file included from /usr/include/php/20160303/main/php.h:40:0,
                 from /tmp/pear/temp/couchbase/couchbase.h:25,
                 from /tmp/pear/temp/couchbase/exception.c:17:
/tmp/pear/temp/couchbase/exception.c:85:32: error: ‘ai_BaseException_ref’ undeclared here (not in a function)
     PHP_ME(BaseException, ref, ai_BaseException_ref, ZEND_ACC_PUBLIC)
                                ^
/usr/include/php/20160303/Zend/zend_API.h:70:75: note: in definition of macro ‘ZEND_FENTRY’
 #define ZEND_FENTRY(zend_name, name, arg_info, flags) { #zend_name, name, arg_info, (uint32_t) (sizeof(arg_info)/sizeof(struct _zend_internal_arg_info)-1), flags },
                                                                           ^~~~~~~~
/usr/include/php/20160303/main/php.h:364:25: note: in expansion of macro ‘ZEND_ME’
 #define PHP_ME          ZEND_ME
                         ^~~~~~~
/tmp/pear/temp/couchbase/exception.c:85:5: note: in expansion of macro ‘PHP_ME’
     PHP_ME(BaseException, ref, ai_BaseException_ref, ZEND_ACC_PUBLIC)
     ^~~~~~
/tmp/pear/temp/couchbase/exception.c:86:36: error: ‘ai_BaseException_context’ undeclared here (not in a function)
     PHP_ME(BaseException, context, ai_BaseException_context, ZEND_ACC_PUBLIC)
                                    ^
/usr/include/php/20160303/Zend/zend_API.h:70:75: note: in definition of macro ‘ZEND_FENTRY’
 #define ZEND_FENTRY(zend_name, name, arg_info, flags) { #zend_name, name, arg_info, (uint32_t) (sizeof(arg_info)/sizeof(struct _zend_internal_arg_info)-1), flags },
                                                                           ^~~~~~~~
/usr/include/php/20160303/main/php.h:364:25: note: in expansion of macro ‘ZEND_ME’
 #define PHP_ME          ZEND_ME
                         ^~~~~~~
/tmp/pear/temp/couchbase/exception.c:86:5: note: in expansion of macro ‘PHP_ME’
     PHP_ME(BaseException, context, ai_BaseException_context, ZEND_ACC_PUBLIC)
     ^~~~~~
/tmp/pear/temp/couchbase/exception.c: In function ‘zim_BaseException_context’:
/tmp/pear/temp/couchbase/exception.c:391:9: warning: implicit declaration of function ‘zend_parse_parameters_none_throw’ [-Wimplicit-function-declaration]
     if (zend_parse_parameters_none_throw() == FAILURE) {
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Makefile:197: recipe for target 'exception.lo' failed
make: *** [exception.lo] Error 1
ERROR: `make' failed

Here are detailed build log:

root@webserver:~#     pecl install https://packages.couchbase.com/clients/php/couchbase-3.0.2.tgz
downloading couchbase-3.0.2.tgz ...
Starting to download couchbase-3.0.2.tgz (129,095 bytes)
......done: 129,095 bytes
79 source files, building
running: phpize
Configuring for:
PHP Api Version:         20160303
Zend Module Api No:      20160303
Zend Extension Api No:   320160303
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = "en_GB:en",
	LC_ALL = (unset),
	LC_MONETARY = "fr_FR.UTF-8",
	LC_ADDRESS = "fr_FR.UTF-8",
	LC_TELEPHONE = "fr_FR.UTF-8",
	LC_NAME = "fr_FR.UTF-8",
	LC_MEASUREMENT = "fr_FR.UTF-8",
	LC_IDENTIFICATION = "fr_FR.UTF-8",
	LC_NUMERIC = "fr_FR.UTF-8",
	LC_PAPER = "fr_FR.UTF-8",
	LANG = "en_GB.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_GB.UTF-8").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = "en_GB:en",
	LC_ALL = (unset),
	LC_MONETARY = "fr_FR.UTF-8",
	LC_ADDRESS = "fr_FR.UTF-8",
	LC_TELEPHONE = "fr_FR.UTF-8",
	LC_NAME = "fr_FR.UTF-8",
	LC_MEASUREMENT = "fr_FR.UTF-8",
	LC_IDENTIFICATION = "fr_FR.UTF-8",
	LC_NUMERIC = "fr_FR.UTF-8",
	LC_PAPER = "fr_FR.UTF-8",
	LANG = "en_GB.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_GB.UTF-8").
building in /tmp/pear/temp/pear-build-root4kkP0e/couchbase-3.0.2
running: /tmp/pear/temp/couchbase/configure --with-php-config=/usr/bin/php-config
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php/20160303 -I/usr/include/php/20160303/main -I/usr/include/php/20160303/TSRM -I/usr/include/php/20160303/Zend -I/usr/include/php/20160303/ext -I/usr/include/php/20160303/ext/date/lib
checking for PHP extension directory... /usr/lib/php/20160303
checking for PHP installed headers prefix... /usr/include/php/20160303
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking whether to enable Couchbase support... yes, shared
checking wheter to use system FastLZ library... no
checking for libcouchbase in default path and yes... found in /usr
checking for libcouchbase version >= 2.9.5... 0x030001
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for compress in -lz... yes
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... (cached) gawk
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
running: make
/bin/bash /tmp/pear/temp/pear-build-root4kkP0e/couchbase-3.0.2/libtool --mode=compile cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/tmp/pear/temp/couchbase -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root4kkP0e/couchbase-3.0.2/include -I/tmp/pear/temp/pear-build-root4kkP0e/couchbase-3.0.2/main -I/tmp/pear/temp/couchbase -I/usr/include/php/20160303 -I/usr/include/php/20160303/main -I/usr/include/php/20160303/TSRM -I/usr/include/php/20160303/Zend -I/usr/include/php/20160303/ext -I/usr/include/php/20160303/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/couchbase/couchbase.c -o couchbase.lo
libtool: compile:  cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/tmp/pear/temp/couchbase -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root4kkP0e/couchbase-3.0.2/include -I/tmp/pear/temp/pear-build-root4kkP0e/couchbase-3.0.2/main -I/tmp/pear/temp/couchbase -I/usr/include/php/20160303 -I/usr/include/php/20160303/main -I/usr/include/php/20160303/TSRM -I/usr/include/php/20160303/Zend -I/usr/include/php/20160303/ext -I/usr/include/php/20160303/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/couchbase/couchbase.c  -fPIC -DPIC -o .libs/couchbase.o
/bin/bash /tmp/pear/temp/pear-build-root4kkP0e/couchbase-3.0.2/libtool --mode=compile cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/tmp/pear/temp/couchbase -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root4kkP0e/couchbase-3.0.2/include -I/tmp/pear/temp/pear-build-root4kkP0e/couchbase-3.0.2/main -I/tmp/pear/temp/couchbase -I/usr/include/php/20160303 -I/usr/include/php/20160303/main -I/usr/include/php/20160303/TSRM -I/usr/include/php/20160303/Zend -I/usr/include/php/20160303/ext -I/usr/include/php/20160303/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/couchbase/exception.c -o exception.lo
libtool: compile:  cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/tmp/pear/temp/couchbase -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root4kkP0e/couchbase-3.0.2/include -I/tmp/pear/temp/pear-build-root4kkP0e/couchbase-3.0.2/main -I/tmp/pear/temp/couchbase -I/usr/include/php/20160303 -I/usr/include/php/20160303/main -I/usr/include/php/20160303/TSRM -I/usr/include/php/20160303/Zend -I/usr/include/php/20160303/ext -I/usr/include/php/20160303/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/couchbase/exception.c  -fPIC -DPIC -o .libs/exception.o

I even tried to install from github source, without success.
Note that the version 3.0.0 installs successfully. The issue seems to be introduced in V3.0.1.

Hi, PHP 7.1 is not supported anymore as it reached end of its life already: https://www.php.net/supported-versions.php

Please consider upgrading to of the supported versions.