PHPantom version
0.8.0
Installation method
Pre-built binary from GitHub Releases
Operating system
Windows x86_64
Editor
Zed
Bug description
ReflectionMethod::getAttributes() 方法应该返回一个数组,但 LSP 告诉我它返回的是 ReflectionAttribute<Attribute>。
Steps to reproduce
$reflection = new ReflectionMethod($class, $method);
$attributes = $reflection->getAttributes(Attribute::class);
// The LSP function throws an error when calling count(): Argument 1 ($value) expects Countable|array, got ReflectionAttribute<Attribute>
if (count($attributes) === 0) {
return null;
}
Error output or panic trace
.phpantom.toml
Additional context
No response
PHPantom version
0.8.0
Installation method
Pre-built binary from GitHub Releases
Operating system
Windows x86_64
Editor
Zed
Bug description
ReflectionMethod::getAttributes()方法应该返回一个数组,但 LSP 告诉我它返回的是ReflectionAttribute<Attribute>。Steps to reproduce
Error output or panic trace
.phpantom.toml
Additional context
No response