Bug #55156 [Opn->Csd]: ReflectionClass::getDocComment() returns comment even though the class has none
| From: | felipe@php.net | Date: | Thu, 07 Jul 2011 23:07:01 +0000 |
| Subject: | Bug #55156 [Opn->Csd]: ReflectionClass::getDocComment() returns comment even though the class has none | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-161698@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=55156&edit=1
ID: 55156
Updated by: felipe@php.net
Reported by: schmittjoh at gmail dot com
Summary: ReflectionClass::getDocComment() returns comment
even though the class has none
-Status: Open
+Status: Closed
Type: Bug
Package: Reflection related
Operating System: Ubuntu 10.04
PHP Version: 5.3.6
-Assigned To:
+Assigned To: felipe
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2011-07-07 06:50:20] schmittjoh at gmail dot com
Note that this only happens if the class that ReflectionClass represents has no doc comment itself.
------------------------------------------------------------------------
[2011-07-07 06:46:11] schmittjoh at gmail dot com
Description:
------------
In some cases, the ReflectionClass::getDocComment() method returns a doc comment that belongs to
another class than the one the ReflectionClass represents.
I haven't been able to reproduce in a isolated script, but instead I have added a failing unit
test to Doctrine's unit test suite, see https://github.com/schmittjoh/common/commit/2d77264758ddd9658791b4284a9492a38bb1b049
You can run this test, by performing the following steps:
git clone http://github.com/schmittjoh/common.git
cd common
git checkout strangePhpError
phpunit
Test script:
---------------
see above
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55156&edit=1