From a87095a3d67e2e49f297d23045f7458cda0d6a03 Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Tue, 22 Dec 2020 19:10:28 +0100 Subject: [PATCH] Add support for amqp with PHP 8.0 --- data/supported-extensions | 2 +- install-php-extensions | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/data/supported-extensions b/data/supported-extensions index 76da6ab..d48a465 100644 --- a/data/supported-extensions +++ b/data/supported-extensions @@ -1,4 +1,4 @@ -amqp 5.5 5.6 7.0 7.1 7.2 7.3 7.4 +amqp 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 apcu 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 apcu_bc 7.0 7.1 7.2 7.3 7.4 bcmath 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 diff --git a/install-php-extensions b/install-php-extensions index fefde8b..62d3490 100755 --- a/install-php-extensions +++ b/install-php-extensions @@ -1321,7 +1321,18 @@ installRemoteModule() { case "$installRemoteModule_module" in amqp) if test -z "$installRemoteModule_version"; then - if test "$DISTRO_VERSION" = debian@8; then + if test $PHP_MAJMIN_VERSION -ge 800; then + if test -z "$installRemoteModule_version"; then + installRemoteModule_version=df1241852b359cf12c346beaa68de202257efdf1 + fi + installRemoteModule_src="$(getPackageSource https://codeload.github.com/php-amqp/php-amqp/tar.gz/$installRemoteModule_version)" + cd -- "$installRemoteModule_src" + phpize + ./configure + make -j$(getProcessorCount) + make install + installRemoteModule_manuallyInstalled=1 + elif test "$DISTRO_VERSION" = debian@8; then # in Debian Jessie we have librammitmq version 0.5.2 installRemoteModule_version=1.9.3 elif test $PHP_MAJMIN_VERSION -le 505; then @@ -1952,6 +1963,9 @@ configureInstaller() { if test "${PHP_MODULE_TO_INSTALL#@}" != "$PHP_MODULE_TO_INSTALL"; then continue fi + if test "$PHP_MODULE_TO_INSTALL" = 'amqp' && test $PHP_MAJMIN_VERSION -ge 800; then + continue + fi if test "$PHP_MODULE_TO_INSTALL" = 'imagick' && test $PHP_MAJMIN_VERSION -ge 800; then continue fi