#47206 [Opn->Csd]: Unintended API change in XSLTProcessor

From: Date: Fri, 20 Nov 2009 10:24:55 +0000
Subject: #47206 [Opn->Csd]: Unintended API change in XSLTProcessor
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-3263@lists.php.net to get a copy of this message
 ID:               47206
 Updated by:       vrana@php.net
 Reported By:      nforbes@php.net
-Status:           Open
+Status:           Closed
 Bug Type:         Documentation problem
 Operating System: Linux
 PHP Version:      5.3CVS-2009-01-24 (snap)
 New Comment:

This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation
better.




Previous Comments:
------------------------------------------------------------------------

[2009-02-05 20:08:57] johannes@php.net

According to the discussion on internals (Thread "towards the next 5.3
release", http://article.gmane.org/gmane.comp.php.devel/55896),
it
should be documented that

- importStylesheet might take DOMDocument or SimpleXMLElement as
parameter
- this was broken in 5.2.6 - 5.2.8 (inclusive) where importStylesheets
only accepted DOMDocument
- when users extend XSLTProcessor they shouldn't set a typehint.

------------------------------------------------------------------------

[2009-02-03 14:53:50] rrichards@php.net

The type hint added in 5.2.6 broke BC and wasn't detected until post 
5.2.8 where it was fixed. It shouldn't have been added in the first 
place

------------------------------------------------------------------------

[2009-02-03 12:06:18] chregu@php.net

dmitry changed that 8 weeks ago with the message:

***
MFH: fix arginfo - these also accept SimpleXMLElement
***

http://cvs.php.net/viewvc.cgi/php-src/ext/xsl/xsltprocessor.c?
r1=1.39.2.2.2.9.2.13&r2=1.39.2.2.2.9.2.14

So, the removing of the typehint has a reason and I don't see a way to

make it BC *and* accept SimpleXMLElement


------------------------------------------------------------------------

[2009-01-30 17:04:17] david dot zuelke at bitextender dot com

(mind you, Rob, that this applies to transformToDoc(), too)

------------------------------------------------------------------------

[2009-01-30 17:01:14] johannes@php.net

Rob,

any problem with a atch like 
------------------------
Index: ext/xsl/xsltprocessor.c
===================================================================
RCS file: /repository/php-src/ext/xsl/xsltprocessor.c,v
retrieving revision 1.39.2.2.2.9.2.15
diff -u -p -r1.39.2.2.2.9.2.15 xsltprocessor.c
--- ext/xsl/xsltprocessor.c	31 Dec 2008 11:15:47
-0000	1.39.2.2.2.9.2.15
+++ ext/xsl/xsltprocessor.c	30 Jan 2009 16:59:15 -0000
@@ -29,7 +29,7 @@
 
 /* {{{ arginfo */
 ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_import_stylesheet, 0,
0, 1)
-	ZEND_ARG_INFO(0, doc)
+	ZEND_ARG_OBJ_INFO(0, doc, "DOMDocument", 0)
 ZEND_END_ARG_INFO();
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_transform_to_doc, 0,
0, 1)
------------------------

I didn't properly test it but it should work ...

------------------------------------------------------------------------

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
    http://bugs.php.net/47206

-- 
Edit this bug report at http://bugs.php.net/?id=47206&edit=1



Thread (2 messages)

« previous php.doc.bugs (#3263) next »