Hello everybody,

I'm experiencing an issue with the DEVSENSE PHP Extension for VS Code where the auto-completion feature is not working as expected for object properties.

When I type "$obj-" in a PHP file, I expect the extension to automatically complete it to "$obj->". However, this is not happening. The dash "-" remains as is and does not change to "->".

Here are the details of my setup:

  • VS Code version: 1.84.1
  • DEVSENSE PHP Extension version: v1.40.14103
  • Operating System: macOS

I have checked the following:

  • The DEVSENSE PHP extension is enabled.
  • The "Editor: Accept Suggestion On Commit Character" setting is enabled.
  • The "Editor: Suggest On Trigger Characters" setting is enabled.
  • I have tried disabling other PHP extensions to see if they were causing a conflict.
  • The file I'm editing is a valid PHP file and is recognized as such in the status bar.

Here is a sample of the code where I'm experiencing the issue:

class ExampleClass {
    public function exampleMethod() {
        $obj = new stdClass();
        $obj->property = 'value';

        // The issue occurs on the next line
        $obj-
    }
}

The issue occurs when I type $obj-, it doesn't complete the > afterwards which should be built-in, right?

I would appreciate any assistance you could provide in resolving this issue.

Best regards

    stefnats Hello, and thank you for your feedback.

    This is a feature (I believe people are used to it from PHPStorm and Visual Assist C++), that PhpTools don't implement (yet!).

    We have this already requested (for 4 years already)

    I'm moving this higher on our to-do list.

    6 days later

    Hey @JakubMisek
    thanks, i thought it was already built-in. You are right, i'm converting from PhpStorm and this would help my day-to-day workflow. Thanks for ranking it higher!

    Write a Reply...