inneair/transaction-bundle
inneair/transaction-bundle is a Symfony bundle for managing database transactions. It provides reusable services and integration points to wrap application operations in transactional boundaries, helping keep persistence logic consistent and easier to maintain in Symfony projects.
DB::beginTransaction() / commit() / rollBack() blocks — is roughly 50–100 lines of code on modern Laravel (DB::transaction(), DB::afterCommit(), PHP 8 attributes). There is no buy-side case; the only real decision is whether to copy the pattern or write it fresh.afterCommit hooks for side effects (mail, events, webhooks)." That decision outlives any package.packages/ directory with attribution rather than depended upon. Treat it as a code sample, not a supplier.Consider it only under a narrow, largely historical set of conditions:
composer.json, and you are doing a stability pass rather than a modernization. In that case the question is "how do we get off it," not "should we add it."Look elsewhere — or build — when any of the following hold, which will be true for essentially every new project:
DB::transaction() with closure-based retries and afterCommit covers the overwhelming majority of the need with zero dependency risk.Recommended next step is a one-hour spike: read the source, write the equivalent as a project-local trait using PHP 8 attributes plus DB::transaction(), and compare. The spike will almost certainly retire the dependency question permanently.
For executives (one paragraph): We evaluated inneair/transaction-bundle, a PHP package that makes database transaction handling declarative, and recommend we do not adopt it. It was last released in 2017, is formally archived, has no downstream users, and receives no security updates — meaning it would add permanent maintenance and compliance exposure in exchange for functionality Laravel now provides natively. The underlying idea is sound and worth adopting as an internal convention, and we can implement it ourselves in roughly a day of engineering with no third-party dependency. Net recommendation: reject the dependency, adopt the pattern; no roadmap impact.
For engineering: The package's value is declarative transaction boundaries at the service layer, which reduces forgotten-rollback bugs in multi-step write flows like checkout and ledger postings. We are not taking the dependency — it is archived, unmaintained since 2017, and untested against Laravel 8+. Instead: (1) standardize on DB::transaction() at the application-service boundary, one transaction per use case, with afterCommit for side effects; (2) if we want the ergonomics, ship a small internal attribute-based wrapper (#[Transactional]) with tests, owned by us; (3) audit existing write flows for missing boundaries as part of normal work, prioritizing money- and inventory-touching paths. Apache-2.0 means we can legally borrow the original's logic — skim it, then write our own.
How can I help you explore Laravel packages today?