ID:               47206
 Updated by:       rricha...@php.net
 Reported By:      nfor...@php.net
-Status:           Assigned
+Status:           Bogus
 Bug Type:         XSLT related
 Operating System: Linux
 PHP Version:      5.3CVS-2009-01-24 (snap)
 Assigned To:      rrichards
 New Comment:

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


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

[2009-02-03 12:06:18] chr...@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] johan...@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 ...

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

[2009-01-30 15:01:22] david dot zuelke at bitextender dot com

Same problem here. Subclasses of XSLTProcessor can work without
E_STRICT 
warning either in 5.2 or in 5.3, but not in both :(

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

[2009-01-24 05:02:08] nfor...@php.net

Description:
------------
In 5.3, attempting to extend XSLTProcessor in the same way as in 5.2
(with type hinting on the method parameters) yields an E_STRICT message:
"Declaration of ExtendedXSLTProcessor::importStylesheet() should be
compatible with that of XSLTProcessor::importStylesheet()".

Removing the type hint fixes the problem in 5.3. I am assuming this
behavior is unintentional, and that the type hint should still be
associated with the methods.

This applies to both ::importStylesheet() and ::transformToDoc(), and
potentially other methods as well.

Reproduce code:
---------------
<?php
class ExtendedXSLTProcessor extends XSLTProcessor {
  public function importStylesheet(DOMDocument $stylesheet) {
    parent::importStylesheet($stylesheet);

    /* ... */
  }
}
?>

Actual result:
--------------
Strict Standards: Declaration of
ExtendedXSLTProcessor::importStylesheet() should be compatible with that
of XSLTProcessor::importStylesheet() in /.../test.php on line 8


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


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

Reply via email to