/** @template T1 as scalar */
interface Foo {}
/** @template-implements Foo<string> */
class Bar {}
psalm reports @template-implements must include the name of an implemented class, got Foo<string>, which while a little obtuse does more-or-less explain itself, I feel like it might be helpful to rephrase it along the lines of class Bar does not implement interface Foo, sourced from @template-implements Foo<string>
whereas in the case of
interface Baz {}
/** @template-implements Baz */
class Bat {}
psalm reports refers Baz as an "invalid class". I feel like the error message should be consistent with the templated first case, whether it's rephrased or just @template-implements must include the name of an implemented class, got Baz
The lesser issue is the reference to interfaces as classes.
https://psalm.dev/r/c717c176ad
```php
*/
class Bar {}
interface Baz {}
/** @template-implements Baz */
class Bat {}
```
```
Psalm output (using commit 35b6a93):
ERROR: InvalidDocblock - 6:1 - @template-implements must include the name of an implemented class, got Foo
ERROR: InvalidDocblock - 11:1 - @template-implements has invalid class Baz
```
In the case of
psalm reports
@template-implements must include the name of an implemented class, got Foo<string>
, which while a little obtuse does more-or-less explain itself, I feel like it might be helpful to rephrase it along the lines ofclass Bar does not implement interface Foo, sourced from @template-implements Foo<string>
whereas in the case of
psalm reports refers
Baz
as an "invalid class". I feel like the error message should be consistent with the templated first case, whether it's rephrased or just@template-implements must include the name of an implemented class, got Baz
The lesser issue is the reference to interfaces as classes.
https://psalm.dev/r/c717c176ad