phpstorm-attributes icon indicating copy to clipboard operation
phpstorm-attributes copied to clipboard

Psalm: TooManyArguments when passing a value for $mayDependOnGlobalScope to Pure attribute

Open MisatoTremor opened this issue 2 years ago • 1 comments

Message: ERROR: TooManyArguments - foo.php:3:2 - Class JetBrains\PhpStorm\Pure has no __construct, but arguments were passed (see https://psalm.dev/026)

<?php

#[Pure(true)]
function bar($a) {
    return $a;
}

MisatoTremor avatar Apr 26 '23 10:04 MisatoTremor

that's because the 1.0 release does not have the argument. It has been added later but has not been released (yet)

stof avatar Jun 12 '23 15:06 stof