I FIXED THE ERRORS BY CHANGING THE FILES SHOWN HERE IN THE PHP SOURCE AT GITHUB https://github.com/php/php-src/commit/8a95e616b91ac0eeedba90a61e36e652919763f2
Package php-8.2.12 FAILS to build due to several similar errors in the file php_libxml.h from lines 148 to 154. These EXACT coding errors are also present for php81 as well.
In file included from main/internal_functions.c:27:
/.cache/yay/php82/src/php-8.2.12/ext/libxml/php_libxml.h: In function ‘php_libxml_sanitize_parse_ctxt_options’:
/.cache/yay/php82/src/php-8.2.12/ext/libxml/php_libxml.h:148:13: error: invalid use of incomplete typedef ‘xmlParserCtxt’ {aka ‘struct _xmlParserCtxt’}
148 | ctxt->loadsubset = 0;
| ^~
/.cache/yay/php82/src/php-8.2.12/ext/libxml/php_libxml.h:149:13: error: invalid use of incomplete typedef ‘xmlParserCtxt’ {aka ‘struct _xmlParserCtxt’}
149 | ctxt->validate = 0;
| ^~
/.cache/yay/php82/src/php-8.2.12/ext/libxml/php_libxml.h:150:13: error: invalid use of incomplete typedef ‘xmlParserCtxt’ {aka ‘struct _xmlParserCtxt’}
150 | ctxt->pedantic = 0;
| ^~
/.cache/yay/php82/src/php-8.2.12/ext/libxml/php_libxml.h:151:13: error: invalid use of incomplete typedef ‘xmlParserCtxt’ {aka ‘struct _xmlParserCtxt’}
151 | ctxt->replaceEntities = 0;
| ^~
/.cache/yay/php82/src/php-8.2.12/ext/libxml/php_libxml.h:152:13: error: invalid use of incomplete typedef ‘xmlParserCtxt’ {aka ‘struct _xmlParserCtxt’}
152 | ctxt->linenumbers = 0;
| ^~
/.cache/yay/php82/src/php-8.2.12/ext/libxml/php_libxml.h:153:13: error: invalid use of incomplete typedef ‘xmlParserCtxt’ {aka ‘struct _xmlParserCtxt’}
153 | ctxt->keepBlanks = 1;
| ^~
/.cache/yay/php82/src/php-8.2.12/ext/libxml/php_libxml.h:154:13: error: invalid use of incomplete typedef ‘xmlParserCtxt’ {aka ‘struct _xmlParserCtxt’}
154 | ctxt->options = 0;
| ^~
make: *** [Makefile:2871: main/internal_functions.lo] Error 1
Pinned Comments