bmewburn / vscode-intelephense

PHP intellisense for Visual Studio Code
https://intelephense.com
Other
1.61k stars 94 forks source link

Null-safe operator is shown as being a syntax error #2812

Closed skerit closed 7 months ago

skerit commented 7 months ago

Describe the bug Similar to #1885, but in my case the null-safe operator is always shown as an error. I have no other PHP extensions enabled.

To Reproduce

    public function getTrip_team_lead()
    {
        if (!$this->team_id) {
            return;
        }

        if (!$this->project->has_trips) {
            return;
        }

        return $this->team?->getTeamLead();
    }

Expected behavior

I expect it to not be marked as wrong.

Screenshots

image

Platform and version

Running on Linux Intelephense v1.10.2

bmewburn commented 7 months ago

What does the error say? If it is not labelled with intelephense then it is coming from another extension, possibly the built-in PHP Language Features. https://code.visualstudio.com/docs/languages/php#_linting

skerit commented 7 months ago

Oh you're right. The php.suggest.basic setting was of, but the php.validate.enable was still on.

image