#6: Queries do not hold references to previous parsed classes/interfaces
Issue revisions
- new by mapi at 2010-J-01 23:09
- assigned by mapi at 2010-J-02 16:28
- assigned by mapi at 2010-J-02 16:29
- closed by mapi at 2010-J-02 20:42
| Type | |
|---|---|
| State | |
| Priority | |
| Resolution | |
| Assigned to | mapi |
| Scheduled for | 0.1.4 |
| Affected versions | 0.1.3 |
| Affected components | |
| Last change | Saturday 2 January 2010 20:42:07 UTC by mapi |
Short description
The current implementation of the file and directory query does not hold references to already parsed class or interface instances. This has the side effect that for example a returned array contains a class and the interface that is implemented by that class. But when you ask the class for its interfaces you get an exception or a null interface, depending on the session configuration.
Steps to reproduce
The given source my look like:
<?php
// test.php
interface Bar {
}
class Foo implements Bar {
}
Tested with a file query, but same applies to the directory query:
<?php // ... $query = $session->createFileQuery(); $result = $query->find( 'test.php' ); var_dump( $result[1]->getInterfaces() );
mapi at Saturday 2 January 2010 16:29:14 UTC
Scheduled for version 0.1.4
mapi at Saturday 2 January 2010 20:42:07 UTC
Fixed in svn revision #269.