HvyIndustries / crane

PHP Intellisense/code-completion for VS Code
https://hvy.io/crane
Other
240 stars 25 forks source link

Does not suggest functions/members from the superclass #295

Open coder966 opened 7 years ago

coder966 commented 7 years ago

The extension does not provide suggestions for functions or variables from the extended class inside the subclass. This happens only when there is a namespace, I suppose. I made 2 classes each one in a separate file in the same folder, then made one extend the other, and it worked. But in this case it does not:

<?php
use PHPUnit\Framework\TestCase;

class FunTest extends TestCase{
    public function testSomething(){
        $this->assert // does not work
    }
}

$t = new TestCase();
$t->assert // works
?>

Project size (number of files and size on disk): Only 1 file. Overview of computer specs: Intel Core i5, 4GB RAM. Your operating system: Ubuntu 16.04 64bit. Some basic steps to reproduce the issue (if possible): code above.

nevadascout commented 7 years ago

Thanks for reporting this!

You would only get suggestions in this case if the source code of the TestCase class was available in your workspace (or in the stubs, I can't remember if they include phpunit).

Which version of PHPUnit are you using here?

coder966 commented 7 years ago

It's PHPUnit 6.0.13 And I have the source code of PHPUnit (downloaded from Github master repo) in my workspace. Actually, if I don't have it in the workspace, the second case (in the original post) will fail, too.

nevadascout commented 7 years ago

Thanks for the info! This sounds like a bug regression...

nonsensecreativity commented 7 years ago

I also have similar issue with auto completion on super class, the class member suggestion is working but parameter suggestion are not working.

Image