1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Add missing ext/libxml dependency to ext/xmlwriter (#14327)

This adds the libxml extension to required dependencies for xmlwriter
during the configuration phase (PHP_ADD_EXTENSION_DEP) and the runtime
(ZEND_MOD_REQUIRED).

The libxml is technically not a required extension in this case but
it necessary to make it work properly (i.e. have proper error
reporting, etc.). Added due to prior libxml requirement in
documentation and build system.
This commit is contained in:
Peter Kokot
2024-05-26 19:27:55 +02:00
committed by GitHub
parent 36a58b35f2
commit 8be3426a7f
2 changed files with 8 additions and 6 deletions

View File

@@ -5,14 +5,10 @@ PHP_ARG_ENABLE([xmlwriter],
[yes])
if test "$PHP_XMLWRITER" != "no"; then
if test "$PHP_LIBXML" = "no"; then
AC_MSG_ERROR([XMLWriter extension requires LIBXML extension, add --with-libxml])
fi
PHP_SETUP_LIBXML(XMLWRITER_SHARED_LIBADD, [
AC_DEFINE(HAVE_XMLWRITER,1,[ ])
PHP_NEW_EXTENSION(xmlwriter, php_xmlwriter.c, $ext_shared)
PHP_ADD_EXTENSION_DEP(xmlwriter, libxml)
PHP_SUBST(XMLWRITER_SHARED_LIBADD)
])
fi

View File

@@ -175,9 +175,15 @@ static char *_xmlwriter_get_valid_file_path(char *source, char *resolved_path, i
}
/* }}} */
static const zend_module_dep xmlwriter_deps[] = {
ZEND_MOD_REQUIRED("libxml")
ZEND_MOD_END
};
/* {{{ xmlwriter_module_entry */
zend_module_entry xmlwriter_module_entry = {
STANDARD_MODULE_HEADER,
STANDARD_MODULE_HEADER_EX, NULL,
xmlwriter_deps,
"xmlwriter",
ext_functions,
PHP_MINIT(xmlwriter),