-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update driver to PHP8.1 #171
Comments
PHP 8.1.2 (cli) (built: Jan 24 2022 10:42:15) (NTS) |
The TSRM* macros are no-op since PHP 7.0. PHP 8.0 drops them at all. Define them as no-op in our code when building against PHP 8 and newer to overcome a build fail. See [1] and [2] (1.c) for details. Those macros could be removed from the code entirely (both definitions and usages), since we support PHP 7.0+. It is to be done later. [1]: https://wiki.php.net/rfc/native-tls [2]: https://github.com/php/php-src/blob/php-8.0.18RC1/UPGRADING.INTERNALS Part of tarantool#171
The `nNextFreeElement` field is initialized with `ZEND_LONG_MIN` instead of zero since PHP 8.0. Adjust our `php_mp_is_hash()` check accordingly. See [1] and [2] for details. NB: PHP 8.1 introduces `zend_array_is_list()`, which may be used here. See [3] and [4] for details. [1]: https://wiki.php.net/rfc/negative_array_index [2]: php/php-src#3772 [3]: https://wiki.php.net/rfc/is_list [4]: php/php-src#6070 Since I don't observe any other problems on PHP 8.1, closing the relevant issue. Fixes tarantool#171
The TSRM* macros are no-op since PHP 7.0. PHP 8.0 drops them at all. Define them as no-op in our code when building against PHP 8 and newer to overcome a build fail. See [1] and [2] (1.c) for details. Those macros could be removed from the code entirely (both definitions and usages), since we support PHP 7.0+. It is to be done later. [1]: https://wiki.php.net/rfc/native-tls [2]: https://github.com/php/php-src/blob/php-8.0.18RC1/UPGRADING.INTERNALS Part of #171
@negram fixed all known problems on PHP 8.0 and 8.1. I'll follow up with packages. |
I can't build a package for Ubuntu Xenial, because Cite from https://github.com/oerdnj/deb.sury.org/wiki/Frequently-Asked-Questions:
Patch (Ubuntu 18.04 Bionic, PHP 8.1 from ppa:ondrej/php)diff --git a/debian/prebuild.sh b/debian/prebuild.sh
index c17d14c..f277e7e 100755
--- a/debian/prebuild.sh
+++ b/debian/prebuild.sh
@@ -11,6 +11,12 @@ SUDO="sudo -E"
${SUDO} apt-get update > /dev/null
${SUDO} apt-get -y install php-all-dev
+# Build against php8.1 on Ubuntu Bionic.
+${SUDO} apt-get install -y software-properties-common
+${SUDO} add-apt-repository -y ppa:ondrej/php
+${SUDO} apt-get update > /dev/null
+${SUDO} apt-get install -y php8.1-dev
+
phpversion=$(php-config --version | sed 's/^\([0-9]\+\.[0-9]\).*/\1/')
cd /build/php-tarantool-*
diff --git a/test.pkg.all.sh b/test.pkg.all.sh
index 138a1b0..388cc62 100755
--- a/test.pkg.all.sh
+++ b/test.pkg.all.sh
@@ -3,27 +3,9 @@
set -exu # Strict shell (w/o -o pipefail)
distros="
- el:8
- fedora:25
- fedora:26
- fedora:27
- fedora:28
- fedora:29
- fedora:30
- fedora:31
- debian:stretch
- debian:buster
- ubuntu:xenial
ubuntu:bionic
- ubuntu:eoan
- ubuntu:focal
"
-if ! type packpack; then
- echo "Unable to find packpack"
- exit 1
-fi
-
for distro in $distros; do
export OS="${distro%%:*}"
export DIST="${distro#*:}"
@@ -31,9 +13,6 @@ for distro in $distros; do
export OS=centos
fi
- rm -rf build
- packpack
-
docker run \
--volume "$(realpath .):/tarantool-php" \
--workdir /tarantool-php \
diff --git a/test.pkg.sh b/test.pkg.sh
index 3c1c271..648d324 100755
--- a/test.pkg.sh
+++ b/test.pkg.sh
@@ -16,7 +16,7 @@ elif type apt-get; then
PM_SYNC='apt-get update'
PM_INSTALL_NAME='apt-get -qy install'
PM_INSTALL_FILE='dpkg -i'
- PKG_GLOB='php7.?-tarantool*_amd64.deb'
+ PKG_GLOB='php8.?-tarantool*_amd64.deb'
# Prevent packages like tzdata from asking configuration
# parameters interactively.
# See https://github.com/packpack/packpack/issues/7
@@ -29,8 +29,14 @@ fi
# Update available packages list.
${PM_SYNC}
+# Verify against php8.1 on Ubuntu Bionic.
+apt-get -y install software-properties-common
+add-apt-repository -y ppa:ondrej/php
+apt-get update > /dev/null
+
# Install php interpreter.
-${PM_INSTALL_NAME} php
+apt-get install -y php8.1
+php --version
# Install php-tarantool package.
${PM_INSTALL_FILE} build/${PKG_GLOB} How to build and verify: $ OS=ubuntu DIST=bionic /path/to/packpack/packpack # build
$ ./test.pkg.all.sh # verify Mostly the same as #117 (comment). |
We use this driver in project on PHP7.4 currently. Now we want to update PHP version to 8.1.2 so we need driver to support this version. We use ondrej/php repo for PHP, Ubuntu 18.04 bionic and Ubuntu 16.04 xenial. Probably builded file will be ok. Help us pls.
The text was updated successfully, but these errors were encountered: