Skip to content

Psalm TooManyTemplateParams error #401

Closed
@gdejong

Description

@gdejong

Given:

<?php

use React\EventLoop\Factory;
use React\Http\Browser;

$loop = Factory::create();

$browser = new Browser($loop);

$browser->get("");

and running Psalm on it with level 6 or lower, I get the following error:

ERROR: TooManyTemplateParams - test.php:10:1 - React\Promise\PromiseInterface<Psr\Http\Message\ResponseInterface> has too many template params, expecting 0 (see https://psalm.dev/184)
$browser->get("");

I am not sure if this is the right place, but I was wondering if you could shed some light on this.
Perhaps Psalm doesn't like the @return PromiseInterface<ResponseInterface> type hint in \React\Http\Browser::get?

Maybe the questions should be, does this project aims to be compatible with Psalm?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions