Devsense Version: 1.0.5264
VSCode Version: 1.49.3
OS: Ubuntu 20.04
PHP: 7.3
ISSUE: When creating a __construct function for a child class that extends from a parent class, the __construct function isn't available for autocomplete.
EXPECTED RESULT: When creating a __construct function for a child class that extends from a parent class, the __construct function is auto-completed and populated with dependencies for parent __construct function.
Example Parent Class:
namespace Path\To\Parent\Namespace;
use Path\To\Class\A;
class Parent
{
public $a;
public function __construct(A $a) {
$this->a = $a;
}
}
Example Child Class With Issue:
namespace Path\To\Child\Namespace;
use Path\To\Parent\Namespace\Parent;
class Child extends Parent
{
public function __construct() {} //<--- THERE'S NO AUTOCOMPLETE SUGGESTION FOR FUNCTION
}
Example Child Class With Desired Result:
namespace Path\To\Child\Namespace;
use Path\To\Parent\Namespace\Parent;
class Child extends Parent
{
public function __construct(\Path\To\Class\A $a) {
parent::__construct($a);
}
}
What's odd is that this functionality works as expected sometimes, but most of the time it doesn't.