Skip to content

[12.x] Add PHPDoc callable types for BusFake methods#58070

Merged
taylorotwell merged 1 commit into
laravel:12.xfrom
alies-dev:fix/bus-fake-phpdoc-closure-types
Dec 10, 2025
Merged

[12.x] Add PHPDoc callable types for BusFake methods#58070
taylorotwell merged 1 commit into
laravel:12.xfrom
alies-dev:fix/bus-fake-phpdoc-closure-types

Conversation

@alies-dev

Copy link
Copy Markdown
Contributor

Add proper callable type hints that document the callback signatures for batch-related methods in BusFake and ChainedBatchTruthTest.

Changes:

  • BusFake::chainedBatch() - @param \Closure(\Illuminate\Bus\PendingBatch): bool
  • BusFake::assertBatched() - @param callable(\Illuminate\Bus\PendingBatch): bool
  • BusFake::batched() - @param callable(\Illuminate\Bus\PendingBatch): bool and @return \Illuminate\Support\Collection<int, \Illuminate\Bus\PendingBatch>
  • ChainedBatchTruthTest::$callback and constructor - @var/@param \Closure(\Illuminate\Bus\PendingBatch): bool

This improves IDE autocompletion and static analysis support when using these testing methods.

Add proper callable type hints that document the callback signatures.
This improves IDE autocompletion and static analysis support.
@taylorotwell taylorotwell merged commit 42d4410 into laravel:12.x Dec 10, 2025
72 checks passed
@alies-dev alies-dev deleted the fix/bus-fake-phpdoc-closure-types branch December 10, 2025 22:53
akyrey pushed a commit to akyrey/framework that referenced this pull request Dec 29, 2025
Add proper callable type hints that document the callback signatures.
This improves IDE autocompletion and static analysis support.
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.

2 participants