This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
To reproduce, in fileA.php type following: $foo = new DateTime("2012-04-16 10:55:16"); In fileB.php: include 'fileA.php'; $foo-> And invoke CC for $foo => nothing is offered, but functions from DateTime should be. The same goes for custom classes
It never worked before, am I right? And it can't work in the current infrastructure. Variables are resolved from model and model is built for current file. I can't ask index scope either, because standalone variables can't be resolved from it. So a lot of thing has to be improved and rewritten. But there is a simple workaround by use of varDoc: <?php include 'fileA.php'; /* @var $foo DateTime */ $foo-> So it should be an enhancement or maybe P4, but P2/P3 enhancement is OK for me (as it never worked and can't be simply implemented).
(In reply to comment #0) > To reproduce, in fileA.php type following: > > $foo = new DateTime("2012-04-16 10:55:16"); > > In fileB.php: > > include 'fileA.php'; > $foo-> Please notice that this is really _bad_ code and IMHO every existing PHP framework discourages from such coding. Therefore lowering to P3.
*** Bug 269983 has been marked as a duplicate of this bug. ***