Hello community, here is the log from the commit of package php7-maxminddb for openSUSE:Factory checked in at 2020-10-02 17:42:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/php7-maxminddb (Old) and /work/SRC/openSUSE:Factory/.php7-maxminddb.new.4249 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "php7-maxminddb" Fri Oct 2 17:42:10 2020 rev:4 rq:839061 version:1.8.0 Changes: -------- --- /work/SRC/openSUSE:Factory/php7-maxminddb/php7-maxminddb.changes 2020-08-12 10:38:55.092363340 +0200 +++ /work/SRC/openSUSE:Factory/.php7-maxminddb.new.4249/php7-maxminddb.changes 2020-10-02 17:42:33.922926894 +0200 @@ -1,0 +2,6 @@ +Fri Oct 2 05:35:01 UTC 2020 - Johannes Weberhofer <jweberho...@weberhofer.at> + +- Updated to version 1.8.0 + * Fixes for PHP 8.0 + +------------------------------------------------------------------- Old: ---- MaxMind-DB-Reader-php-1.7.0.tar.gz New: ---- MaxMind-DB-Reader-php-1.8.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ php7-maxminddb.spec ++++++ --- /var/tmp/diff_new_pack.FCz65O/_old 2020-10-02 17:42:34.642927324 +0200 +++ /var/tmp/diff_new_pack.FCz65O/_new 2020-10-02 17:42:34.646927326 +0200 @@ -19,7 +19,7 @@ %define source_file MaxMind-DB-Reader-php %define pkg_name maxminddb Name: php7-%{pkg_name} -Version: 1.7.0 +Version: 1.8.0 Release: 0 Summary: PHP extension providing access to maxminddb databases License: Apache-2.0 ++++++ MaxMind-DB-Reader-php-1.7.0.tar.gz -> MaxMind-DB-Reader-php-1.8.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MaxMind-DB-Reader-php-1.7.0/CHANGELOG.md new/MaxMind-DB-Reader-php-1.8.0/CHANGELOG.md --- old/MaxMind-DB-Reader-php-1.7.0/CHANGELOG.md 2020-08-08 00:10:05.000000000 +0200 +++ new/MaxMind-DB-Reader-php-1.8.0/CHANGELOG.md 2020-10-01 19:30:21.000000000 +0200 @@ -1,6 +1,11 @@ CHANGELOG ========= +1.8.0 (2020-10-01) +------------------ + +* Fixes for PHP 8.0. Pull Request by Remi Collet. GitHub #108. + 1.7.0 (2020-08-07) ------------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MaxMind-DB-Reader-php-1.7.0/composer.json new/MaxMind-DB-Reader-php-1.8.0/composer.json --- old/MaxMind-DB-Reader-php-1.7.0/composer.json 2020-08-08 00:10:05.000000000 +0200 +++ new/MaxMind-DB-Reader-php-1.8.0/composer.json 2020-10-01 19:30:21.000000000 +0200 @@ -21,7 +21,7 @@ "ext-maxminddb": "A C-based database decoder that provides significantly faster lookups" }, "conflict": { - "ext-maxminddb": "<1.7.0,>=2.0.0" + "ext-maxminddb": "<1.8.0,>=2.0.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "2.*", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MaxMind-DB-Reader-php-1.7.0/ext/maxminddb.c new/MaxMind-DB-Reader-php-1.8.0/ext/maxminddb.c --- old/MaxMind-DB-Reader-php-1.7.0/ext/maxminddb.c 2020-08-08 00:10:05.000000000 +0200 +++ new/MaxMind-DB-Reader-php-1.8.0/ext/maxminddb.c 2020-10-01 19:30:21.000000000 +0200 @@ -45,15 +45,21 @@ typedef zend_object free_obj_t; /* For PHP 8 compatibility */ -#ifndef TSRMLS_C +#if PHP_VERSION_ID < 80000 + +#define PROP_OBJ(zv) (zv) + +#else + +#define PROP_OBJ(zv) Z_OBJ_P(zv) + #define TSRMLS_C -#endif -#ifndef TSRMLS_CC #define TSRMLS_CC -#endif -#ifndef TSRMLS_DC #define TSRMLS_DC + +/* End PHP 8 compatibility */ #endif + #ifndef ZEND_ACC_CTOR #define ZEND_ACC_CTOR 0 #endif @@ -334,23 +340,13 @@ return; } MMDB_free_entry_data_list(entry_data_list); -#if PHP_VERSION_ID >= 80000 - zend_call_method_with_1_params(Z_OBJ_P(return_value), + zend_call_method_with_1_params(PROP_OBJ(return_value), metadata_ce, &metadata_ce->constructor, ZEND_CONSTRUCTOR_FUNC_NAME, NULL, &metadata_array); zval_ptr_dtor(&metadata_array); -#else - zend_call_method_with_1_params(return_value, - metadata_ce, - &metadata_ce->constructor, - ZEND_CONSTRUCTOR_FUNC_NAME, - NULL, - &metadata_array); - zval_ptr_dtor(&metadata_array); -#endif } PHP_METHOD(MaxMind_Db_Reader, close) { @@ -607,7 +603,7 @@ "binary_format_major_version", sizeof("binary_format_major_version") - 1))) { zend_update_property(metadata_ce, - object, + PROP_OBJ(object), "binaryFormatMajorVersion", sizeof("binaryFormatMajorVersion") - 1, tmp); @@ -617,7 +613,7 @@ "binary_format_minor_version", sizeof("binary_format_minor_version") - 1))) { zend_update_property(metadata_ce, - object, + PROP_OBJ(object), "binaryFormatMinorVersion", sizeof("binaryFormatMinorVersion") - 1, tmp); @@ -626,15 +622,18 @@ if ((tmp = zend_hash_str_find(HASH_OF(metadata_array), "build_epoch", sizeof("build_epoch") - 1))) { - zend_update_property( - metadata_ce, object, "buildEpoch", sizeof("buildEpoch") - 1, tmp); + zend_update_property(metadata_ce, + PROP_OBJ(object), + "buildEpoch", + sizeof("buildEpoch") - 1, + tmp); } if ((tmp = zend_hash_str_find(HASH_OF(metadata_array), "database_type", sizeof("database_type") - 1))) { zend_update_property(metadata_ce, - object, + PROP_OBJ(object), "databaseType", sizeof("databaseType") - 1, tmp); @@ -643,28 +642,40 @@ if ((tmp = zend_hash_str_find(HASH_OF(metadata_array), "description", sizeof("description") - 1))) { - zend_update_property( - metadata_ce, object, "description", sizeof("description") - 1, tmp); + zend_update_property(metadata_ce, + PROP_OBJ(object), + "description", + sizeof("description") - 1, + tmp); } if ((tmp = zend_hash_str_find(HASH_OF(metadata_array), "ip_version", sizeof("ip_version") - 1))) { - zend_update_property( - metadata_ce, object, "ipVersion", sizeof("ipVersion") - 1, tmp); + zend_update_property(metadata_ce, + PROP_OBJ(object), + "ipVersion", + sizeof("ipVersion") - 1, + tmp); } if ((tmp = zend_hash_str_find( HASH_OF(metadata_array), "languages", sizeof("languages") - 1))) { - zend_update_property( - metadata_ce, object, "languages", sizeof("languages") - 1, tmp); + zend_update_property(metadata_ce, + PROP_OBJ(object), + "languages", + sizeof("languages") - 1, + tmp); } if ((tmp = zend_hash_str_find(HASH_OF(metadata_array), "record_size", sizeof("record_size") - 1))) { - zend_update_property( - metadata_ce, object, "recordSize", sizeof("recordSize") - 1, tmp); + zend_update_property(metadata_ce, + PROP_OBJ(object), + "recordSize", + sizeof("recordSize") - 1, + tmp); if (Z_TYPE_P(tmp) == IS_LONG) { record_size = Z_LVAL_P(tmp); } @@ -672,7 +683,7 @@ if (record_size != 0) { zend_update_property_long(metadata_ce, - object, + PROP_OBJ(object), "nodeByteSize", sizeof("nodeByteSize") - 1, record_size / 4); @@ -681,8 +692,11 @@ if ((tmp = zend_hash_str_find(HASH_OF(metadata_array), "node_count", sizeof("node_count") - 1))) { - zend_update_property( - metadata_ce, object, "nodeCount", sizeof("nodeCount") - 1, tmp); + zend_update_property(metadata_ce, + PROP_OBJ(object), + "nodeCount", + sizeof("nodeCount") - 1, + tmp); if (Z_TYPE_P(tmp) == IS_LONG) { node_count = Z_LVAL_P(tmp); } @@ -690,7 +704,7 @@ if (record_size != 0) { zend_update_property_long(metadata_ce, - object, + PROP_OBJ(object), "searchTreeSize", sizeof("searchTreeSize") - 1, record_size * node_count / 4); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MaxMind-DB-Reader-php-1.7.0/ext/php_maxminddb.h new/MaxMind-DB-Reader-php-1.8.0/ext/php_maxminddb.h --- old/MaxMind-DB-Reader-php-1.7.0/ext/php_maxminddb.h 2020-08-08 00:10:05.000000000 +0200 +++ new/MaxMind-DB-Reader-php-1.8.0/ext/php_maxminddb.h 2020-10-01 19:30:21.000000000 +0200 @@ -15,7 +15,7 @@ #ifndef PHP_MAXMINDDB_H #define PHP_MAXMINDDB_H 1 -#define PHP_MAXMINDDB_VERSION "1.7.0" +#define PHP_MAXMINDDB_VERSION "1.8.0" #define PHP_MAXMINDDB_EXTNAME "maxminddb" extern zend_module_entry maxminddb_module_entry; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MaxMind-DB-Reader-php-1.7.0/package.xml new/MaxMind-DB-Reader-php-1.8.0/package.xml --- old/MaxMind-DB-Reader-php-1.7.0/package.xml 2020-08-08 00:10:05.000000000 +0200 +++ new/MaxMind-DB-Reader-php-1.8.0/package.xml 2020-10-01 19:30:21.000000000 +0200 @@ -14,9 +14,9 @@ <email>goschw...@maxmind.com</email> <active>yes</active> </lead> - <date>2020-08-07</date> + <date>2020-10-01</date> <version> - <release>1.7.0</release> + <release>1.8.0</release> <api>1.7.0</api> </version> <stability> @@ -24,17 +24,7 @@ <api>stable</api> </stability> <license uri="https://github.com/maxmind/MaxMind-DB-Reader-php/blob/master/LICENSE">Apache License 2.0</license> - <notes>* IMPORTANT: PHP 7.2 or greater is now required. -* The extension no longer depends on the pure PHP classes in - `maxmind-db/reader`. You can use it independently. -* Type hints have been added to both the pure PHP implementation - and the extension. -* The `metadata` method on the reader now returns a new copy of the - metadata object rather than the actual object used by the reader. -* Work around PHP `is_readable()` bug. Reported by Ben Roberts. GitHub - #92. -* This is the first release of the extension as a PECL package. - GitHub #34.</notes> + <notes>* Fixes for PHP 8.0. Pull Request by Remi Collet. GitHub #108.</notes> <contents> <dir name="/"> <file role="doc" name="LICENSE"/>