Bug #64235 [PATCH]: Insteadof not work for class method in 5.4.11
| From: | laruence@php.net | Date: | Wed, 20 Feb 2013 08:07:58 +0000 |
| Subject: | Bug #64235 [PATCH]: Insteadof not work for class method in 5.4.11 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-177244@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=64235&edit=1
ID: 64235
Patch added by: laruence@php.net
Reported by: imenem at inox dot ru
Summary: Insteadof not work for class method in 5.4.11
Status: Feedback
Type: Bug
Package: Scripting Engine problem
Operating System: Debian GNU/Linux
PHP Version: 5.4.11
Assigned To: dmitry
Block user comment: N
Private report: N
New Comment:
The following patch has been added/updated:
Patch Name: bug64235.patch
Revision: 1361347678
URL: https://bugs.php.net/patch-display.php?bug=64235&patch=bug64235.patch&revision=1361347678
Previous Comments:
------------------------------------------------------------------------
[2013-02-20 08:04:11] dmitry@php.net
It's hard to say what is expected :)
I thought only traits may be used in context of "insteadof", now I'm not sure.
I sent the question to Stefan Marr. Lets wait for his opinion.
------------------------------------------------------------------------
[2013-02-20 08:00:02] reeze@php.net
insteadof and 'as' bother for traits, I thought after the trait refactor, it's
works as expected.
If we keep 'insteadof' could been used for class method as feature I'm fine:0
------------------------------------------------------------------------
[2013-02-20 07:58:32] dmitry@php.net
Yet another traits mess :(
I suppose, it worked in 5.4.4 because of mistake.
RFC and traits documentation don't say if class names may be used in context of "as"
and "insteadof" operators.
In my opinion, class names must not be used in contest of "as".
However, their usage in context of "inseadof" may make sense (I'm not sure).
Anyway, it has to be defined in documentation first.
------------------------------------------------------------------------
[2013-02-20 07:44:12] laruence@php.net
fix attached, which fix this bug, and trigger fatal error in compile time for the
test script I pasted before.
------------------------------------------------------------------------
[2013-02-20 07:41:23] laruence@php.net
The following patch has been added/updated:
Patch Name: bug64235.phpt
Revision: 1361346083
URL: https://bugs.php.net/patch-display.php?bug=64235&patch=bug64235.phpt&revision=1361346083
------------------------------------------------------------------------
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=64235
--
Edit this bug report at https://bugs.php.net/bug.php?id=64235&edit=1