vscode-intelephense
vscode-intelephense copied to clipboard
Support class-string phpdoc annotation
Currently, intelephense can't recognize class-string
annotation. Here sample code to demonstrate the issue.
<?php
/** @param class-string $classname */
function className(string $classname)
{
}
/** @var class-string $class */
$class = 'test';
className($class);
There is no such type in phpdoc, afaik this is non-standard type from psalm.
Yes. I don't use psalm. This pseudotype is introduced by PHPStan 0.12
any news on this?
Any news ? It has been 2 years now and it is documented here https://phpstan.org/writing-php-code/phpdoc-types#class-string.
class-string
support added in 1.9.0