Edit report at https://bugs.php.net/bug.php?id=64235&edit=1

 ID:                 64235
 Comment by:         re...@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:

@laurence  the code you paste above works the same as before:
http://3v4l.org/UpMCW#v5411 that didn't break

After read some doc I assume class is not suitable in context of 'insteadof', 
so let's wait for Stefan or more discussion :)


Previous Comments:
------------------------------------------------------------------------
[2013-02-20 08:12:40] larue...@php.net

form the context,  insteadof works at class make sense.

reeze, whatever the RFC is, your fix simply skip check for classes at all, 
which 
will make the test script I paste result in "FATAL ERROR, undefined method", 
that 
is not acceptable.

------------------------------------------------------------------------
[2013-02-20 08:07:58] larue...@php.net

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

------------------------------------------------------------------------
[2013-02-20 08:04:11] dmi...@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] re...@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] dmi...@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.

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


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

Reply via email to