Req #55719 [PATCH]: Argument restriction should come with a more specific error message
| From: | laruence@php.net | Date: | Sun, 18 Sep 2011 14:54:57 +0000 |
| Subject: | Req #55719 [PATCH]: Argument restriction should come with a more specific error message | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-163649@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=55719&edit=1
ID: 55719
Patch added by: laruence@php.net
Reported by: laruence@php.net
Summary: Argument restriction should come with a more
specific error message
Status: Open
Type: Feature/Change Request
Package: Unknown/Other Function
PHP Version: trunk-SVN-2011-09-18 (SVN)
Block user comment: N
Private report: N
New Comment:
The following patch has been added/updated:
Patch Name: argument_restriction_001.phpt
Revision: 1316357697
URL: https://bugs.php.net/patch-display.php?bug=55719&patch=argument_restriction_001.phpt&revision=1316357697
Previous Comments:
------------------------------------------------------------------------
[2011-09-18 14:54:42] laruence@php.net
The following patch has been added/updated:
Patch Name: bug55719.diff
Revision: 1316357682
URL: https://bugs.php.net/patch-display.php?bug=55719&patch=bug55719.diff&revision=1316357682
------------------------------------------------------------------------
[2011-09-18 13:15:01] laruence@php.net
and anyway, I really think a FATAL ERROR(for abstract class) is too radical, a STRICT or DEPREACTE
warning is better.
------------------------------------------------------------------------
[2011-09-18 13:11:17] laruence@php.net
Description:
------------
as discussed in ML,
now PHP will trigger a FATAL or STRICT warning for incompatible arguments between a class and a
subclass method,
Test script:
---------------
<?php
class XSoapClient extends SoapClient {
function __doRequest($request, $location, $action, $version) {
}
}
Expected result:
----------------
Declaration of XSoapClient::__doRequest() should be compatible with
SoapClient::__doRequest($request, $location, $action, $version, $one_way = NULL)
Actual result:
--------------
Declaration of XSoapClient::__doRequest() should be compatible with that of
SoapClient::__doRequest()
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55719&edit=1