Skip to content

replicate phpstan 12585#31

Closed
calebdw wants to merge 1 commit into
3.xfrom
phpstan_12585
Closed

replicate phpstan 12585#31
calebdw wants to merge 1 commit into
3.xfrom
phpstan_12585

Conversation

@calebdw
Copy link
Copy Markdown
Owner

@calebdw calebdw commented Feb 13, 2025

Replicates the bug in phpstan/phpstan#12585

The test fails with:

- Anonymous function should return Illuminate\Database\Eloquent\Builder<Illuminate\Database\Eloquent\Model> but returns App\PostBuilder<App\Post>
- Anonymous function should return Illuminate\Database\Eloquent\Builder<Illuminate\Database\Eloquent\Model> but returns App\PostBuilder<App\Post>
- Parameter #2 $callback of method Illuminate\Database\Eloquent\Builder<App\User>::whereHas() expects
  (Closure(Illuminate\Database\Eloquent\Builder<App\Post>): mixed)|null,
  Closure(App\PostBuilder): void given

@calebdw calebdw closed this Feb 16, 2025
@calebdw calebdw deleted the phpstan_12585 branch February 16, 2025 04:07
@calebdw
Copy link
Copy Markdown
Owner Author

calebdw commented Feb 16, 2025

See reproduction: phpstan/phpstan-src#3828

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant