Describe the bug
PHPDoc types (https://phpstan.org/writing-php-code/phpdoc-types) are not fully supported.
For example, using @param non-negative-int $myVar results in Intelephense detecting the type as <current namespace>\non-negative-int and providing warnings that incorrect types are passed around (as other function parameters or returns using the type are detected as <other namespace>\non-negative-int
To Reproduce
<?php
namespace SomeNamespace\Domain;
class SomeClass
{
/**
* @param non-negative-int $param1
* @param non-negative-int $param2
*/
public function doSomething(int $param1, int $param2) {
.... some code
}
}
Describe the bug PHPDoc types (https://phpstan.org/writing-php-code/phpdoc-types) are not fully supported. For example, using
@param non-negative-int $myVar
results in Intelephense detecting the type as<current namespace>\non-negative-int
and providing warnings that incorrect types are passed around (as other function parameters or returns using the type are detected as<other namespace>\non-negative-int
To Reproduce
Expected behavior Intelephense should not complain about these types
Platform and version MacOS Sonoma 14.5 (23F79) VSCode 1.91.1 Intelephense Extension 1.10.4 - 2024-03-26