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 - Code completion is not resolving types inside a php file without having a project.
Summary: Code completion is not resolving types inside a php file without having a pro...
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.2
Hardware: All All
: P2 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-27 09:46 UTC by Christian Lenz
Modified: 2016-10-27 10:58 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.