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.

Bug 268709

Summary: Code completion is not resolving types inside a php file without having a project.
Product: php Reporter: Christian Lenz <chrizzly>
Component: EditorAssignee: Tomas Mysik <tmysik>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: 8.2   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description Christian Lenz 2016-10-27 09:46:51 UTC
I opened a single PHP file from the Desktop with this piece of code:

<?php
class Test {
    function Tester(int $a, string $b) {
        echo "Tester";
    }
}

class TestImpl extends Test {
    function Tester($a, $b) {
        echo "Overridden";
    }
}

$testImpl = new TestImpl();
$testImpl->Tester(1, "t");


When I typed class TestImpl extends the code completion will not resolve the Test class inside the file. It is not there.

Same happens for new TestImpl(). After writing new, it will not find TestImpl inside this file. After -> too, it will not find Tester.

When I have a PHP project, everything is fine, but not in a single PHP file without having a project. I expect the same full functionality in such single file.


Regards

Chris
Comment 1 Tomas Mysik 2016-10-27 10:08:44 UTC
This works as designed, we do not support this scenario, sorry.

Thanks for reporting.
Comment 2 Christian Lenz 2016-10-27 10:58:24 UTC
I understand it, but if you open a folder over favorites I think this is not a corner case scenario.