Skip to content

Commit e86bd9d

Browse files
committed
Add afterCommit entries to 5.4 migration guide
1 parent 4fdd917 commit e86bd9d

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

docs/en/appendices/5-4-migration-guide.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ version is reported as `unknown`), the header is omitted.
4545
has changed from `select` to `subquery`. If you need the previous behavior,
4646
explicitly set `'strategy' => 'select'` when defining associations.
4747
See [Associations](../orm/associations#has-many-associations) for more details.
48+
- `Model.afterSaveCommit` and `Model.afterDeleteCommit` events are now fired
49+
when `save()` or `delete()` is called inside an outer transaction. Previously,
50+
these events were silently suppressed. They are now deferred until the
51+
outermost transaction commits, and discarded on rollback.
52+
See [Table Objects](../orm/table-objects#aftersavecommit) for more details.
4853

4954
### Controller
5055

@@ -99,6 +104,9 @@ version is reported as `unknown`), the header is omitted.
99104
See [Query Builder](../orm/query-builder#advanced-conditions).
100105
- Added `inOrNull()` and `notInOrNull()` methods for combining `IN` conditions with `IS NULL`.
101106
- Added `isDistinctFrom()` and `isNotDistinctFrom()` methods for null-safe comparisons.
107+
- Added `Connection::afterCommit()` to register callbacks that run after the
108+
outermost transaction commits. Callbacks are discarded on rollback.
109+
See [Database Basics](../orm/database-basics#aftercommit) for more details.
102110
- Added `except()` and `exceptAll()` methods on `SelectQuery` for `EXCEPT`
103111
and `EXCEPT ALL` set operations. `EXCEPT ALL` is supported on PostgreSQL
104112
and recent MySQL/MariaDB versions; it is not supported on SQLite or SQL Server.

0 commit comments

Comments
 (0)