From f275ebbf81bab40e0139791552789cb2816c930b Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 24 Aug 2022 14:13:20 +0200 Subject: [PATCH] xmlRelaxNGCleanupTypes() is deprecated as of libxml2 2.10.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The documentation[1] suggest to call `xmlCleanupParser()` instead, but we are not doing that for reasons[2]. Thus, we do no longer call `xmlRelaxNGCleanupTypes()` for libxml2 ≥ 2.10.0. [1] [2] --- ext/libxml/libxml.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c index 21ad5df2c3ce0..5813f437d22c6 100644 --- a/ext/libxml/libxml.c +++ b/ext/libxml/libxml.c @@ -775,7 +775,7 @@ PHP_LIBXML_API void php_libxml_initialize(void) PHP_LIBXML_API void php_libxml_shutdown(void) { if (_php_libxml_initialized) { -#ifdef LIBXML_SCHEMAS_ENABLED +#if defined(LIBXML_SCHEMAS_ENABLED) && LIBXML_VERSION < 21000 xmlRelaxNGCleanupTypes(); #endif /* xmlCleanupParser(); */