Bug #71595 [Ana->Csd]: NS end handler is never called

From: Date: Fri, 07 Feb 2020 06:06:28 +0000
Subject: Bug #71595 [Ana->Csd]: NS end handler is never called
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-225404@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71595&edit=1 ID: 71595 Updated by: phpdocbot@php.net Reported by: anrdaemon at freemail dot ru Summary: NS end handler is never called -Status: Analyzed +Status: Closed Type: Bug Package: XML related Operating System: Windows PHP Version: 5.6.18 Block user comment: N Private report: N New Comment: Automatic comment on behalf of cmb Revision: http://git.php.net/?p=doc/en.git;a=commit;h=47065812c2450dce5dcc8d62e80f1e75698c6163 Log: Fix #71595: NS end handler is never called Previous Comments: ------------------------------------------------------------------------ [2017-01-08 18:50:21] cmb@php.net Even though bug #30834 has been closed as "won't fix", IMHO, this is not just a documentation issue. Either xml_set_end_namespace_decl_handler() shouldn't be defined, if it is not supported by the underlying library, or it should at least trigger a warning when called. For backwards compatibility the latter appears to be more appropriate. BTW, can somebody please kill the spam posts above? ------------------------------------------------------------------------ [2017-01-08 18:41:12] cmb@php.net Automatic comment from SVN on behalf of cmb Revision: http://svn.php.net/viewvc/?view=revision&revision=341634 Log: Fix #71595: NS end handler is never called ------------------------------------------------------------------------ [2016-07-22 12:45:47] rasmus at mindplay dot dk This should be considered a bug. The fact that an XML parser API happens to be implemented by library that doesn't work predictably, is an implementation detail - it shouldn't mean that we offer an unpredictable/broken feature in PHP. I just wasted like half a day before realizing that this function simply doesn't work and just silently fails. (under PHP 7 on Windows) I then spent several more hours implementing support for xmlns-attributes myself, which was pretty difficult to get right - I suppose everyone who needs xmlns-support has to roll their own, and I'm sure many will get it wrong. Beyond that, it's hard to imagine how someone managed to even make this feature platform-dependent in the first place? Either way, having this one feature in an otherwise functional API that just quietly fails, is in my opinion completely unacceptable. ------------------------------------------------------------------------ [2016-02-16 22:16:05] anrdaemon at freemail dot ru Thanks, I've apparently missed that one note. Should probably be a warning, and way up on the page, as it would be an impediment on most platforms. ------------------------------------------------------------------------ [2016-02-16 20:53:33] ab@php.net Yeah, clear the documentation could and should be improved. However, with this particular ticket, it's documented http://php.net/xml_set_end_namespace_decl_handler , please consider the note on the page: This event is not supported under LibXML. Maybe it's not synced with all the available languages, but actually i see that many contain it. What is not documented and I think it's hard to document, is what library is actually used with any particular build in a particular binary distribution. Right now, besides Windows builds at least Debian and Fedora use libxml instead of libxpat, for what i've checked. The main reason I think is that libxml is being supported and updated much more frequently. This info can be however gathered on the corresponding package pages of the respective distributions. The other three tickets reported by you (just decrementing this ticked number :) need to be checked thoroughly as well, but how it reads from the code snippets and from the code base - the cause seems to be the same. So for now I'm turning this ticket into the documentation issue, lets see with the others. Thanks. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=71595 -- Edit this bug report at https://bugs.php.net/bug.php?id=71595&edit=1

« previous php.bugs (#225404) next »