[PECL-CVS] [pecl-search_engine-solr] master: Remove deprecated xmlIndentTreeOutput

[email protected] (Birgir Haraldsson) Mon, 18 May 2026 12:24:31 +0000
Newsgroups php.pecl.cvs
Message-ID <[email protected]>
Author: Birgir Haraldsson (bix0r)
Date: 2026-05-12T10:14:02+02:00

Commit: https://github.com/php/pecl-search_engine-solr/commit/f3c19b8ea480b678e1f29e777248e8e2d3e69348
Raw diff: https://github.com/php/pecl-search_engine-solr/commit/f3c19b8ea480b678e1f29e777248e8e2d3e69348.diff

Remove deprecated xmlIndentTreeOutput

Fixes #97

Changed paths:
  M  src/php_solr_client.c
  M  src/php_solr_document.c
  M  src/php_solr_params.c


Diff:

diff --git a/src/php_solr_client.c b/src/php_solr_client.c
index 3a7fd3c8..0cf3ed57 100644
--- a/src/php_solr_client.c
+++ b/src/php_solr_client.c
@@ -714,7 +714,6 @@ PHP_METHOD(SolrClient, addDocument)
 
 	solr_add_doc_node(root_node, doc_entry);
 
-	xmlIndentTreeOutput = 1;
 	xmlDocDumpFormatMemoryEnc(doc_ptr, &request_string, &size, "UTF-8", format);
 
 	/* The XML request we are sending to Solr */
@@ -879,8 +878,6 @@ PHP_METHOD(SolrClient, addDocuments)
 	/* We are done with the doc_entries pointer */
 	SOLR_FREE_DOC_ENTRIES(doc_entries);
 
-	xmlIndentTreeOutput = 1;
-
 	xmlDocDumpFormatMemoryEnc(doc_ptr, &request_string, &size, "UTF-8", format);
 
 	/* The XML request we are sending to Solr */
@@ -1067,8 +1064,6 @@ PHP_METHOD(SolrClient, deleteById)
 	xmlNewChild(root_node, NULL, (xmlChar *) "id", escaped_id_value);
 	xmlFree(escaped_id_value);
 
-	xmlIndentTreeOutput = 1;
-
 	xmlDocDumpFormatMemoryEnc(doc_ptr, &request_string, &size, "UTF-8", format);
 
 	/* The XML request we are sending to Solr */
@@ -1169,8 +1164,6 @@ end_doc_ids_loop :
 		return;
 	}
 
-	xmlIndentTreeOutput = 1;
-
 	xmlDocDumpFormatMemoryEnc(doc_ptr, &request_string, &size, "UTF-8", format);
 
 	/* The XML request we are sending to Solr */
@@ -1240,8 +1233,6 @@ PHP_METHOD(SolrClient, deleteByQuery)
 	xmlNewChild(root_node, NULL, (xmlChar *) "query", escaped_query_value);
 	xmlFree(escaped_query_value);
 
-	xmlIndentTreeOutput = 1;
-
 	xmlDocDumpFormatMemoryEnc(doc_ptr, &request_string, &size, "UTF-8", format);
 
 	/* The XML request we are sending to Solr */
@@ -1517,8 +1508,6 @@ end_doc_queries_loop :
 		return;
 	}
 
-	xmlIndentTreeOutput = 1;
-
 	xmlDocDumpFormatMemoryEnc(doc_ptr, &request_string, &size, "UTF-8", format);
 
 	/* The XML request we are sending to Solr */
@@ -1593,8 +1582,6 @@ PHP_METHOD(SolrClient, optimize)
 		return;
 	}
 
-	xmlIndentTreeOutput = 1;
-
 	xmlDocDumpFormatMemoryEnc(doc_ptr, &request_string, &size, "UTF-8", format);
 
 	/* The XML request we are sending to Solr */
@@ -1662,8 +1649,6 @@ PHP_METHOD(SolrClient, commit)
 		return;
 	}
 
-	xmlIndentTreeOutput = 1;
-
 	xmlDocDumpFormatMemoryEnc(doc_ptr, &request_string, &size, "UTF-8", format);
 
 	/* The XML request we are sending to Solr */
@@ -1714,8 +1699,6 @@ PHP_METHOD(SolrClient, rollback)
 		return;
 	}
 
-	xmlIndentTreeOutput = 1;
-
 	xmlDocDumpFormatMemoryEnc(doc_ptr, &request_string, &size, "UTF-8", format);
 
 	/* The XML request we are sending to Solr */
diff --git a/src/php_solr_document.c b/src/php_solr_document.c
index 89b0b72b..8cf3b4f9 100644
--- a/src/php_solr_document.c
+++ b/src/php_solr_document.c
@@ -220,8 +220,6 @@ static void solr_serialize_document_object(HashTable *document_fields, xmlChar *
 
 	} /* SOLR_HASHTABLE_FOR_LOOP(document_fields) */
 
-	xmlIndentTreeOutput = 1;
-
 	xmlDocDumpFormatMemoryEnc(doc_ptr, buffer, size, "UTF-8", format);
 
 	xmlFreeDoc(doc_ptr);
diff --git a/src/php_solr_params.c b/src/php_solr_params.c
index 4c8036b2..932651b8 100644
--- a/src/php_solr_params.c
+++ b/src/php_solr_params.c
@@ -183,8 +183,6 @@ static int solr_serialize_solr_params_object(xmlChar **serialized, int *size, zv
 		}
 	}
 
-	xmlIndentTreeOutput = 1;
-
 	xmlDocDumpFormatMemoryEnc(doc_ptr, serialized, size, "UTF-8", format);
 	xmlFreeDoc(doc_ptr);