microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.63k stars 29.04k forks source link

Syntax Highlighting For PHP Broken When Using Trait Classes #32036

Closed M-Porter closed 7 years ago

M-Porter commented 7 years ago
Extension Author (truncated) Version
erb Cra 0.0.1
EditorConfig Edi 0.9.4
laravel-blade KTa 0.0.1
ejs-language-support Qas 0.0.1
ActiveFileInStatusBar Ros 1.0.2
jsx Twe 0.0.1
sort-lines Tyr 1.3.0
scratchpad awe 0.1.0
gotemplate cas 0.1.1
code-wsync mpo 0.0.1
vscode-eslint dba 1.2.11
python don 0.7.0
prettier-vscode esb 0.22.1
php-debug fel 1.11.1
docthis joe 0.4.7
php-symbols lin 2.1.0
Go luk 0.6.63
prettify-json moh 0.0.3
atom-keybindings ms- 3.0.1
php-docblocker nei 1.2.0
vetur oct 0.9.3
Ruby reb 0.13.0
vscode-icons rob 7.12.0
stylelint shi 0.28.0
simple-ruby-erb vor 0.2.1
twig wha 1.0.2
jinja who 0.0.8

(2 theme extensions excluded)


Steps to Reproduce:

  1. New File
  2. Set Syntax to PHP
  3. Insert code snippet:

    <?php
    
    class MyClass
    {
        use \My\TraitClass;
    
        /**
         * @param string $a
         * @return string
         */
        public function myFunction($a)
        {
            return ':(';
        }
    }

Reproduces without extensions: Yes


I believe this a very recent breakage because I have not noticed this before and I use a decent amount of trait classes.

Currently what it looks like:

screen shot 2017-08-04 at 11 34 19 am

Expected (had to set syntax to blade to get it to look correct):

screen shot 2017-08-04 at 11 34 11 am
roblourens commented 7 years ago

This should be fixed in the Insiders build, would appreciate it if you try it out there.

https://code.visualstudio.com/insiders

M-Porter commented 7 years ago

Oh dope. Works. Thanks @roblourens!