Doc #73195 [Ana->Csd]: ReflectionClass::getMethod() filter arguments doesn't accept combinations
| From: | cmb@php.net | Date: | Thu, 29 Sep 2016 10:13:20 +0000 |
| Subject: | Doc #73195 [Ana->Csd]: ReflectionClass::getMethod() filter arguments doesn't accept combinations | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-13962@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73195&edit=1
ID: 73195
Updated by: cmb@php.net
Reported by: grgtvs at gmail dot com
Summary: ReflectionClass::getMethod() filter arguments
doesn't accept combinations
-Status: Analyzed
+Status: Closed
Type: Documentation Problem
Package: Reflection related
Operating System: GNU/Linux
PHP Version: Irrelevant
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation better.
Previous Comments:
------------------------------------------------------------------------
[2016-09-29 10:12:52] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&revision=340255
Log: Fix #73195: ReflectionClass::getMethod() filter arguments doesn't accept combinations
------------------------------------------------------------------------
[2016-09-29 09:43:40] cmb@php.net
Unfortunately, using the complement (~) can't work without causing
a considerable BC break. For instance,
~IS_PUBLIC would
basically translate to `IS_STATIC | IS_FINAL | IS_ABSTRACT |
IS_PROTECTED | IS_PRIVATE`, so static public methods would be
returned, what is not desired.
The attached patch would change the semantics of bitwise
disjunction of the filter, so that all given flags would be
required. For instance, IS_PUBLIC | IS_PROTECTED would never
match.
So all we can do (at least for now) is to improve the docs.
------------------------------------------------------------------------
[2016-09-28 16:37:16] cmb@php.net
> Do you have karma, cmb?
Yes. I'll have a closer look at the issue, and check that the
change doesn't break anything else. If all works well, I'll treat
this as a bug, and apply to PHP-5.6+.
------------------------------------------------------------------------
[2016-09-28 16:29:09] johannes@php.net
I believe this was designed to do only "positive" filtering. If we get negation to work I
believe we should do this and add an example to the docs. Do you have karma, cmb?
------------------------------------------------------------------------
[2016-09-28 15:49:17] cmb@php.net
The following patch has been added/updated:
Patch Name: 73195
Revision: 1475077757
URL: https://bugs.php.net/patch-display.php?bug=73195&patch=73195&revision=1475077757
------------------------------------------------------------------------
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=73195
--
Edit this bug report at https://bugs.php.net/bug.php?id=73195&edit=1