atom/language-php

Inconsistent highlighting when variable is called as a function

Closed this issue · 2 comments

microsoft/vscode#111035

Original issue

  • VSCode Version: 1.51.1
  • OS Version:mac OS 10.15.6

Steps to Reproduce:

In the method runInternal the dollarsign ($) next to callback is white, even though it should be light blue:

<?php
namespace app\tests\unit\tasks\behaviors;

use app\tasks\Task;
use app\tests\unit\tasks\TestTaskTrait;

class TempTableBehaviorTestTask extends Task
{
    use TestTaskTrait {
        TestTaskTrait::runInternal as baseRunInternal;
    }

    public $runInternalCallback;

    public $tempTableConfig;

    /**
     * @inheritdoc
     */
    public function runInternal()
    {
        if (is_callable($this->runInternalCallback)) {
            $callback = $this->runInternalCallback;
            $callback($this);
        }
        return $this->baseRunInternal();
    }

    /**
     * @inheritdoc
     */
    public function behaviors()
    {
        $behaviors = parent::behaviors();
        $behaviors['tempTable']['enabled'] = true;
        $behaviors['tempTable']['tableConfig'] = $this->tempTableConfig;
        return $behaviors;
    }
}

Screenshot:

Screenshot 2020-11-20 at 15 11 31

Does this issue occur when all extensions are disabled?: Yes

It also does occur in vs code insiders:

Screenshot 2020-11-20 at 17 38 19

The user @kanlukasz has also confirmed this behavior on Windows 10 with WSL2 env on the original issue bmewburn/vscode-intelephense#1520


End original issue

image
image

The word callback on the second line is still a variable.other.php but the dollar sign is not

Duplicate of #382 #383

Ah, couldn't find it.