Skip to content

[13.x] Improve BatchRepository transaction return type#60506

Closed
shane-zeng wants to merge 1 commit into
laravel:13.xfrom
shane-zeng:batch-repository-transaction-return-type
Closed

[13.x] Improve BatchRepository transaction return type#60506
shane-zeng wants to merge 1 commit into
laravel:13.xfrom
shane-zeng:batch-repository-transaction-return-type

Conversation

@shane-zeng

Copy link
Copy Markdown
Contributor

This PR updates the BatchRepository::transaction() contract to preserve the return type of the provided callback.

The concrete batch repository implementations already use @template TReturn; this change aligns the interface so callers typed against BatchRepository also benefit from the same PHPStan inference.

A type assertion was added to cover the interface-typed usage.

@shane-zeng shane-zeng closed this Jun 13, 2026
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