Req #53369 [Opn->Sus]: Context parameter for simplexml_load_file and SimpleXMLElement::__construct
Edit report at https://bugs.php.net/bug.php?id=53369&edit=1
ID: 53369
Updated by: cmb@php.net
Reported by: juwe at clasennet dot de
Summary: Context parameter for simplexml_load_file and
SimpleXMLElement::__construct
-Status: Open
+Status: Suspended
Type: Feature/Change Request
Package: SimpleXML related
PHP Version: *
Block user comment: N
Private report: N
New Comment:
> Furthermore a hint in the manual entries for both functions to
> libxml_set_streams_context() or contexts in general would be good.
Done[1].
Wrt. the feature request, I suggest to pursue the RFC process[2];
otherwise it's likely that this ticket will be unaddressed for
another ten years. For the time being, I suspend it.
[1] <https://github.com/php/doc-en/commit/6199e10e916fbd656632d677dbf96569328b9b3b>
[2] <https://wiki.php.net/rfc/howto>
Previous Comments:
------------------------------------------------------------------------
[2010-11-21 11:28:05] juwe at clasennet dot de
Description:
------------
A lot of the file/stream accessing functions have a context parameter.
In contrast, SimpleXMLElement::__construct() and simplexml_load_file() do not.
Both are able to use other contexts though, since you can change the context in use using
libxml_set_streams_context().
The problem with that is, that future requests using any of the other xml extensions are affected as
well by using the function mentioned above.
In the interest of a consistent interface and a minimized risk to break things, it would be nice to
see a context parameter for the SimpleXMLElement::__construct() and simplexml_load_file().
Furthermore a hint in the manual entries for both functions to libxml_set_streams_context() or
contexts in general would be good.
I just spend a number of hours debugging my code, and the error turned out to be a missing context
reset in a class from somebody else... :(
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=53369&edit=1
Thread (2 messages)