diff options
Diffstat (limited to 'solr-php82.patch')
-rw-r--r-- | solr-php82.patch | 59 |
1 files changed, 45 insertions, 14 deletions
diff --git a/solr-php82.patch b/solr-php82.patch index 60e2871..67c89da 100644 --- a/solr-php82.patch +++ b/solr-php82.patch @@ -1,8 +1,17 @@ +From e90b33b4c5d3b94da4f12923242f943aa5558d4c Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Fri, 9 Sep 2022 15:37:33 +0200 +Subject: [PATCH 1/2] fix __toString method for 8.2 + +--- + src/php7/php_solr.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + diff --git a/src/php7/php_solr.c b/src/php7/php_solr.c -index 2110296..eb9dd22 100644 +index de69bc8..d06a9cc 100644 --- a/src/php7/php_solr.c +++ b/src/php7/php_solr.c -@@ -542,6 +542,13 @@ ZEND_ARG_INFO(SOLR_ARG_PASS_BY_REF_FALSE, mime_type) +@@ -554,6 +554,13 @@ ZEND_ARG_INFO(SOLR_ARG_PASS_BY_REF_FALSE, mime_type) ZEND_ARG_OBJ_INFO(SOLR_ARG_PASS_BY_REF_TRUE, params, SolrModifiableParams, SOLR_ARG_ALLOW_NULL_FALSE) ZEND_END_ARG_INFO() @@ -16,7 +25,7 @@ index 2110296..eb9dd22 100644 /* }}} */ -@@ -607,7 +614,7 @@ static zend_function_entry solr_collapse_function_methods[] = { +@@ -619,7 +626,7 @@ static zend_function_entry solr_collapse_function_methods[] = { PHP_ME(SolrCollapseFunction, setNullPolicy, SolrCollapseFunction_set_null_policy_args, ZEND_ACC_PUBLIC) PHP_ME(SolrCollapseFunction, getNullPolicy, Solr_no_args, ZEND_ACC_PUBLIC) @@ -25,7 +34,7 @@ index 2110296..eb9dd22 100644 PHP_ME(SolrCollapseFunction, __sleep, Solr_no_args, ZEND_ACC_PUBLIC) PHP_ME(SolrCollapseFunction, __wakeup, Solr_no_args, ZEND_ACC_PUBLIC) -@@ -772,7 +779,7 @@ static zend_function_entry solr_illegal_argument_exception_methods[] = { +@@ -788,7 +795,7 @@ static zend_function_entry solr_illegal_argument_exception_methods[] = { static zend_function_entry solr_params_methods[] = { PHP_ME(SolrParams, setParam, SolrParams_setParam_args, ZEND_ACC_PUBLIC) PHP_ME(SolrParams, addParam, SolrParams_addParam_args, ZEND_ACC_PUBLIC) @@ -34,15 +43,37 @@ index 2110296..eb9dd22 100644 PHP_ME(SolrParams, toString, SolrParams_toString_args, ZEND_ACC_PUBLIC) PHP_ME(SolrParams, getParams, Solr_no_args, ZEND_ACC_PUBLIC) PHP_ME(SolrParams, getParam, SolrParams_getParam_args, ZEND_ACC_PUBLIC) -diff --git a/tests/test.config.inc b/tests/test.config.inc -index 1d61156..1475d76 100644 ---- a/tests/test.config.inc -+++ b/tests/test.config.inc -@@ -1,6 +1,6 @@ - <?php - --define('SOLR_SERVER_CONFIGURED', true); -+define('SOLR_SERVER_CONFIGURED', false); + +From 0c0e3d155f58a674e654e2aa447d9f8570ac4fc8 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Wed, 9 Nov 2022 13:32:41 +0100 +Subject: [PATCH 2/2] allow dynamic properties + +--- + src/php7/php_solr.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/php7/php_solr.c b/src/php7/php_solr.c +index d06a9cc..8062090 100644 +--- a/src/php7/php_solr.c ++++ b/src/php7/php_solr.c +@@ -1207,6 +1207,9 @@ PHP_MINIT_FUNCTION(solr) + INIT_CLASS_ENTRY(ce, PHP_SOLR_OBJECT_CLASSNAME, solr_object_methods); + solr_ce_SolrObject = zend_register_internal_class(&ce); + solr_ce_SolrObject->ce_flags |= ZEND_ACC_FINAL; ++#if PHP_VERSION_ID >= 80200 ++ solr_ce_SolrObject->ce_flags |= ZEND_ACC_ALLOW_DYNAMIC_PROPERTIES; ++#endif - define('ROOT_DIRECTORY', dirname(__FILE__)); + /* SolrObject implements ArrayAccess */ + zend_class_implements(solr_ce_SolrObject, 1, solr_ce_ArrayAccess); +@@ -1239,6 +1242,9 @@ PHP_MINIT_FUNCTION(solr) + INIT_CLASS_ENTRY(ce, PHP_SOLR_INPUT_DOCUMENT_CLASSNAME, solr_input_document_methods); + solr_ce_SolrInputDocument = zend_register_internal_class(&ce); + solr_ce_SolrInputDocument->ce_flags |= ZEND_ACC_FINAL; ++#if PHP_VERSION_ID >= 80200 ++ solr_ce_SolrInputDocument->ce_flags |= ZEND_ACC_ALLOW_DYNAMIC_PROPERTIES; ++#endif + /* This internal property will be used to map to this SolrDocument instance */ + zend_declare_property_long(solr_ce_SolrInputDocument, SOLR_INDEX_PROPERTY_NAME, sizeof(SOLR_INDEX_PROPERTY_NAME) -1, 0L, ZEND_ACC_PRIVATE); |