We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A construct of
/** @template T of CrudEntity */ interface CrudNew { /** @param class-string<CrudRequest<T>> $requestClass */ public function handle(string $requestClass): void; }
doesn't seem to accept a class string implementing CrudRequest<T>:
CrudRequest<T>
https://psalm.dev/r/adda512f6a
The text was updated successfully, but these errors were encountered:
I found these snippets:
<?php /** @template T of CrudEntity */ interface CrudRequest {} interface CrudEntity {} /** @implements CrudRequest<Author> */ class AuthorRequest implements CrudRequest {} class Author implements CrudEntity {} /** @template T of CrudEntity */ interface CrudNew { /** @param class-string<CrudRequest<T>> $requestClass */ public function handle(string $requestClass): void; } class AuthorNew { /** @param CrudNew<Author> $crudNew */ public function __invoke($crudNew): void { $crudNew->handle(AuthorRequest::class); } }
Psalm output (using commit 17558a5): ERROR: InvalidArgument - 29:26 - Argument 1 of CrudNew::handle expects class-string<CrudRequest<T>>, AuthorRequest::class provided
Sorry, something went wrong.
ea82cdc
No branches or pull requests
A construct of
doesn't seem to accept a class string implementing
CrudRequest<T>
:https://psalm.dev/r/adda512f6a
The text was updated successfully, but these errors were encountered: