-
-
Notifications
You must be signed in to change notification settings - Fork 938
Open
Description
Bug report
I noticed that a test had started failing in phpstan-drupal where we check a variable named $callable that we use a stub to mark as callable-string. It broke with 2.1.38: mglaman/phpstan-drupal#938. I believe this was broken with phpstan/phpstan-src#4829
Our stub:
/**
* @param callable-string $callback
* @param array<int|string, mixed> $args
*/
public function createPlaceholder($callback, array $args): string {
}The real code
* @param string $callback
* The #lazy_builder callback that will replace the placeholder with its
* eventual markup.
* @param array $args
* The arguments for the #lazy_builder callback.
*
* @return string
* The placeholder markup.
*/
public function createPlaceholder($callback, array $args) {
Code snippet that reproduces the problem
https://phpstan.org/r/3caeb8f6-befd-42b7-a80b-5cc56057ed69
Expected output
I don't know how to test a stub file with the playground, so this passes.
Did PHPStan help you today? Did it make you happy in any way?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels