I am trying to move from phpdoc to psalm and I am getting weird error with its template based returns.
class Message {}
interface FooInterface
{
/** @return Pagerfanta|Message[] */
public function getMessages(): Pagerfanta;
}
This is showing TooManyTemplateParams
error even though I am setting exactly one and Pagerfanta also has exactly one parameter set in its definition.
Even psalm online validator is showing this error: https://psalm.dev/r/68b22e896f
What am I doing wrong?