From 6e73a49cb7efec20e9c861b239ff24e6fe2c7b9b Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 23 Jul 2021 12:26:26 +0200 Subject: add patch for PHP 8.1.0beta1 from https://github.com/mongodb/mongo-php-driver/pull/1240 --- mongodb-php81.patch | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 mongodb-php81.patch (limited to 'mongodb-php81.patch') diff --git a/mongodb-php81.patch b/mongodb-php81.patch new file mode 100644 index 0000000..d30767a --- /dev/null +++ b/mongodb-php81.patch @@ -0,0 +1,32 @@ +From 6b4109bb3657d6611f116e06a91699952b8a2fc5 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Fri, 23 Jul 2021 12:21:44 +0200 +Subject: [PATCH] Fix API change in 8.1.0beta1 + +--- + php_phongo.h | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/php_phongo.h b/php_phongo.h +index bf6bf094..7b0c1a3b 100644 +--- a/php_phongo.h ++++ b/php_phongo.h +@@ -169,11 +169,18 @@ bool php_phongo_manager_unregister(php_phongo_manager_t* manager); + ce->ce_flags |= ZEND_ACC_FINAL; \ + } while (0); + ++#if PHP_VERSION_ID < 80100 + #define PHONGO_CE_DISABLE_SERIALIZATION(ce) \ + do { \ + ce->serialize = zend_class_serialize_deny; \ + ce->unserialize = zend_class_unserialize_deny; \ + } while (0); ++#else ++#define PHONGO_CE_DISABLE_SERIALIZATION(ce) \ ++ do { \ ++ ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE; \ ++ } while (0); ++#endif + + #define PHONGO_GET_PROPERTY_HASH_INIT_PROPS(is_debug, intern, props, size) \ + do { \ -- cgit