SanderRonde / phpstan-vscode

PHPStan plugin for VSCode
https://marketplace.visualstudio.com/items?itemName=SanderRonde.phpstan-vscode
MIT License
47 stars 8 forks source link

"Not checking project because of invalid PHP file" with PHP 8.3 Typed Class Constants #63

Closed MrMeshok closed 8 months ago

MrMeshok commented 8 months ago

Сan be checked with this example

class Test
{
    public const string TEST = 'test';
}

I understand that you use library php-parser for checking and can't do much until library will be updated. Maybe add option to disable this check, because phpstan can check php syntax himself. I deleted line let e=this._config.documents.getInvalidFile();if(e){se(this._config.connection,bo,`Not checking project because of invalid PHP file: ${e}`);return}

from ~/.vscode/extensions/sanderronde.phpstan-vscode-3.0.3/out/server.js, everything seems ok

SanderRonde commented 8 months ago

Ahh you're right. I'll make this a setting so you can turn it off.

MrMeshok commented 8 months ago

Thank you!

SanderRonde commented 8 months ago

I've added the phpstan.checkValidity setting in the latest 3.0.4 version release