Skip to content

[13.x] Improve return types for callback-passthrough interfaces and helpers#60513

Merged
taylorotwell merged 1 commit into
laravel:13.xfrom
dfinchenko:improve-return-types-callback-passthroughs
Jun 15, 2026
Merged

[13.x] Improve return types for callback-passthrough interfaces and helpers#60513
taylorotwell merged 1 commit into
laravel:13.xfrom
dfinchenko:improve-return-types-callback-passthroughs

Conversation

@dfinchenko

Copy link
Copy Markdown
Contributor

Completes the @template TReturn treatment on the callback-passthrough transaction interfaces whose implementations already received it, so the contract matches the concrete classes and inference works through the interface:

  • Database\ConnectionInterface::transaction()
  • Bus\BatchRepository::transaction()

Plus the remaining passthrough helpers that still returned mixed but simply
invoke the given callback and return its result:

  • Redis\Connections\PacksPhpRedisValues::withoutSerializationOrCompression()
  • Cache\RateLimiter::withoutSerializationOrCompression()
  • Queue\Failed\FileFailedJobProvider::lock()

Docblock/generic-only, no behavior change; types/ assertions added for the interfaces and the public trait method.

@taylorotwell taylorotwell merged commit f22a1c8 into laravel:13.x Jun 15, 2026
55 checks passed
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