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

 ID:                 64592
 Updated by:         fel...@php.net
 Reported by:        benjamin dot morel at gmail dot com
 Summary:            ReflectionClass::getMethods() returns methods out of
                     scope
-Status:             Not a bug
+Status:             Open
 Type:               Bug
 Package:            Reflection related
 Operating System:   Linux
 PHP Version:        5.4.13
 Block user comment: N
 Private report:     N



Previous Comments:
------------------------------------------------------------------------
[2013-04-06 16:25:28] benjamin dot morel at gmail dot com

@felipe, did you read the bug before closing it? We're not talking about "not 
accessible", but "not in scope".
This is totally different.

The fact is, if you run my example, getMethods() and getProperties() do not 
behave 
in the same way, thus either this is a bug in getMethods(), and if not, this is 
a 
bug in getProperties().

But I'm pretty sure it's getProperties() that behaves correctly here.
Could you please comment on this?

------------------------------------------------------------------------
[2013-04-06 15:27:46] fel...@php.net

It is not intended to just show the accessible ones, hence we already have 
introduced method like ReflectionMethod::setAccessible().

------------------------------------------------------------------------
[2013-04-06 15:11:19] benjamin dot morel at gmail dot com

Works like a charm with your patch, thanks!
Any chance that gets into 5.4, or at least 5.5 (if there is a fear of breaking 
BC 
with existing libraries that would rely on this behaviour)?

------------------------------------------------------------------------
[2013-04-06 13:19:41] larue...@php.net

The following patch has been added/updated:

Patch Name: bug64592.patch
Revision:   1365254381
URL:        
https://bugs.php.net/patch-display.php?bug=64592&patch=bug64592.patch&revision=1365254381

------------------------------------------------------------------------
[2013-04-06 11:54:57] benjamin dot morel at gmail dot com

But at least, getMethods() and getProperties() should behave in the same way, 
shouldn't they?

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


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=64592


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

Reply via email to