File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Changelog
2+
3+ ## 1.0.0 (2026-06-24)
4+
5+ The first stable release of ` cycle/transaction ` — a small transaction abstraction for Cycle ORM
6+ that runs raw DBAL operations and a scoped Entity Manager within a single database transaction.
7+
8+ ### Features
9+
10+ * Introduce the ` Transaction::transact() ` API: execute a callback inside a single database
11+ transaction, receiving a scoped ` EntityManagerInterface ` and the resolved ` DatabaseInterface ` .
12+ The transaction is committed when the callback returns and rolled back if it throws.
13+ * Add the ` FlushMode ` enum to control when and how the scoped Entity Manager flushes pending changes:
14+ * ` OnWrite ` — flush every ` persist ` /` persistState ` /` delete ` immediately;
15+ * ` BeforeCommit ` — collect all changes and flush once, right before committing (default);
16+ * ` FailOnPending ` — throw a ` TransactionException ` if any changes are left unflushed;
17+ * ` SkipPending ` — silently discard any unflushed changes (only DBAL operations are committed).
18+ * Add the ` TransactionMode ` enum to control how the Unit of Work interacts with the open
19+ transaction: ` Current ` (reuse the open transaction, default), ` OpenNew ` (open a dedicated inner
20+ transaction per connection) and ` Ignore ` (do not manage transactions for the Unit of Work).
21+ * Resolve the target database from the ` $source ` argument — either by connection name or by an
22+ entity class mapped to it; the scoped Entity Manager rejects entities that belong to a different
23+ connection, preventing accidental cross-connection writes.
24+
25+ ### Documentation
26+
27+ * Add a README covering installation and usage of the transaction API, flush modes and
28+ transaction modes.
29+
30+ ### Requirements
31+
32+ * PHP 8.2 or higher
33+ * ` cycle/orm ` ^2.18
34+ * ` cycle/database ` ^2.20
Original file line number Diff line number Diff line change 11{
2- "." : " 0.1 .0"
2+ "." : " 1.0 .0"
33}
You can’t perform that action at this time.
0 commit comments