Skip to content

Commit 6f851f3

Browse files
roxblnfkclaude
andcommitted
chore: release 1.0.0
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 0a4ce54 commit 6f851f3

2 files changed

Lines changed: 35 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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

resources/version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.1.0"
2+
".": "1.0.0"
33
}

0 commit comments

Comments
 (0)