bmewburn / vscode-intelephense

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

[SOLVED] "finally" syntax error, unexpected { #3090

Closed SaintFrag closed 2 hours ago

SaintFrag commented 2 hours ago

Describe the bug In a .php file, I have a try, catch, finally block. Intelephense flags the finally { as "syntax error, unexpected '{'".

To Reproduce

<?php

try {
    // Something
} catch (Exception $e) {
    // Error
} finally {
    // Finally
}

Expected behavior The code is valid and simply shouldn't throw a syntax error. Add in some logging feedback to see it runs just fine.

Platform and version Windows 10, VS 1.94.0 PHP Intelephense 1.12.6

SaintFrag commented 2 hours ago

I just realized I had not disabled PHP Language Features. That solved it.