Skip to content

Commit eeb504d

Browse files
oprudkyitaka-oyama
authored andcommitted
fix: explicitly stage/clear transaction to correctly run afterCommit jobs (#144)
laravel v10.32.0 requires explicit staging of transactions laravel/framework#48859 # Conflicts: # CHANGELOG.md
1 parent 1cd26e0 commit eeb504d

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# v5.3.0 [Not released Yet]
2+
3+
Fixed
4+
- Explicitly stage/clear transaction on commit to correctly run afterCommit jobs in Laravel >= [v10.32.0](https://github.com/laravel/framework/pull/48859) (#144)
5+
16
# v5.2.2 (2023-08-22)
27

38
Fixed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"php": "^8.1",
1212
"ext-grpc": "*",
1313
"ext-json": "*",
14-
"laravel/framework": "~10.0",
14+
"laravel/framework": "^10.32.0",
1515
"google/cloud-spanner": "^1.58.4",
1616
"grpc/grpc": "^1.42",
1717
"symfony/cache": "~6",

src/Concerns/ManagesTransactions.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ protected function performSpannerCommit(): void
141141
$this->currentTransaction->commit();
142142
}
143143

144+
$this->transactionsManager?->stageTransactions($this->getName());
145+
144146
$this->transactions = max(0, $this->transactions - 1);
145147
if ($this->isTransactionFinished()) {
146148
$this->currentTransaction = null;

0 commit comments

Comments
 (0)