SanderRonde / phpstan-vscode

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

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

Closed MrMeshok closed 3 months ago

MrMeshok commented 4 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 4 months ago

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

MrMeshok commented 4 months ago

Thank you!

SanderRonde commented 3 months ago

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