Skip to content

atom, completion returns 0 results, depth 2 #623

Open
@pelallemant

Description

@pelallemant

Hi,

To illustrate my case, I wrote the following example. It does work perfectly with that size, but in my current project, it isn't able to resolve completion at the last line.

class SuperClass
{
  public function __construct() {}
  public function method1SuperClass() {}
  public function method2SuperClass() {}
}

class MyClass
{
  /** @var SuperClass */
  public $instance_superclass;
  
  public function __construct() {
    $this->instance_superclass = new SuperClass();
  }
  
  /**
   * @return SuperClass 
   */
  public function getInstance() {
    return $this->instance_superclass;
  }
}

$t = new MyClass();
// the following line, ctrl + space shows a modal with 'getInstance()' and 'MySuperClass' type resolved
$t->
// the following line, ctrl + space shows nothing, in the log there is are textDocument/completion received with 0 items.
$t->getInstance()->

For example, I would like to have the autocompletion to do:

$t->
$t->getter1()->
$t->getter1()->getter2()->
$t->getter1()->getter2()->getter3()->
$t->getter1()->getter2()->getter3()->getter4()->

But after $t->getter1()-> I do received only textDocument/completion notifications with 0 items.

Are there way to see if some classes are parsed ?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions