You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi if you declare a new Attribute in PHP 8 this error is thrown:
Constructor of class XX\XXX\Structs\Attribute\ArrayList has an unused parameter $structName.
In this case it is part of the standart and the paramter will be used in reflection.
Code snippet that reproduces the problem
<?php
declare(strict_types=1);
namespace XX\XXX\Structs\Attribute;
use Attribute;
#[Attribute(Attribute::TARGET_PROPERTY)]
final class ArrayList
{
public function __construct(string $structName)
{}
}
Bug report
Hi if you declare a new Attribute in PHP 8 this error is thrown:
Constructor of class XX\XXX\Structs\Attribute\ArrayList has an unused parameter $structName.
In this case it is part of the standart and the paramter will be used in reflection.
Code snippet that reproduces the problem
https://phpstan.org/r/4f6303f0-6e98-46e8-9efc-9baf39b03a8b
Expected output
The issue is reported incorrectly.
Did PHPStan help you today? Did it make you happy in any way?
Yes, every day!
The text was updated successfully, but these errors were encountered: