Conversation
https://github.com/phan/phan/wiki/Generic-Types#indicating-a-method-creates-an-instance-of-the-passed-in-class-name Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
|
Yep. Should also work with Psalm and hopefully PHPStorm sometime. |
Does work, but now Psalm stumbles over the non-class keys. :/ Anyways - something that we can look into with this separate PR. |
Things that are good to clean up :) |
|
Ah. At some places we are still using ->query('UserStatus'). Psalm is unable to resolve those aliases and fails. |
Exactly - but this is something we can tackle in 21. |
|
🤖 beep boop beep 🤖 Here are the logs for the failed build: Status of 33109: failuremariadb10.1-php7.2Show full logmysql8.0-php7.2Show full logacceptance-app-theming
Show full logacceptance-header
Show full log |
|
|
||
| /** | ||
| * @template T | ||
| * @param class-string<T> $id |
There was a problem hiding this comment.
what if you use class-string<T>|string for now? would that work with our named aliases?
|
Implemented via #23377 |
https://github.com/phan/phan/wiki/Generic-Types#indicating-a-method-creates-an-instance-of-the-passed-in-class-name
Extracted from #18680 by @kesselb