- What is inneair/transaction-bundle and what does it do?
- It is a Composer package distributed as a Symfony bundle for wrapping database operations in transactional boundaries, with closure-based callbacks, automatic rollback on exceptions, and nested transaction support. Its metadata and naming indicate a Symfony bundle rather than a native Laravel package, and it was last released in 2017. The package is archived upstream, so treat any Laravel use as a custom integration rather than a supported feature.
- Is inneair/transaction-bundle compatible with Laravel?
- Not natively. The package follows Symfony bundle conventions, and Laravel has no bundle concept; using it would require a bridge service provider and configuration mapping. Laravel already provides DB::transaction, manual beginTransaction/commit/rollback, and transactionLevel for most of the same needs. For a new Laravel project, it is not a drop-in dependency.
- How do I install inneair/transaction-bundle with Composer?
- You would normally install it with composer require inneair/transaction-bundle, but the package is archived and has no upstream maintainer releasing updates. A 2017-era Symfony bundle can impose Symfony component constraints that conflict with components Laravel ships transitively. Before installing, run a Composer dry run and review dependency resolution for downgrades or pins.
- Does inneair/transaction-bundle support nested transactions and savepoints?
- The package description advertises nested transaction support with savepoints, which is useful for wrapping smaller units inside a larger transaction. However, that behavior is not documented as tested against Laravel's connection layer. Laravel's DB::transaction already supports nested transaction levels and savepoints through its connection implementation. You should verify savepoint behavior with your specific database driver before relying on it.
- How does automatic rollback work when an exception is thrown?
- The closure-based workflow commits when the callback completes successfully and rolls back when an exception escapes the transaction boundary. This reduces repetitive try/catch boilerplate around critical persistence operations. Because transaction bugs often appear as partial commits or swallowed rollbacks, test failure paths against your real database, not just mocks.
- Does it handle deadlock retries for transient database failures?
- The package description mentions retry handling for deadlocks and transient failures, but the archived codebase has no public production evidence or recent test coverage. Retry behavior must be validated against your database engine, isolation level, and Laravel queue or job context. If retries are essential, a small maintained wrapper around Laravel's DB::transaction with explicit retry logic may be safer.
- Which Laravel and PHP versions does inneair/transaction-bundle support?
- The package was last released in 2017 and was built for the Symfony ecosystem of that era, so it is not expected to support modern Laravel or PHP 8.x runtimes. Its Symfony component constraints may collide with the versions Laravel installs transitively. Static analysis and a test run on your target PHP version are mandatory before any pilot.
- How can I test transaction callbacks in Laravel?
- You can test callback-based transaction code by asserting database state before and after the callback runs, including the exception path that should trigger a rollback. Laravel's RefreshDatabase and DatabaseTransactions traits help isolate test data, but they do not exercise the package's own transaction boundary. For Laravel-native testing, DB::transaction with assertions on commit and rollback outcomes is more straightforward.
- Is inneair/transaction-bundle safe for production use?
- The repository is archived, has zero dependents and only 10 stars, so there is no upstream maintainer to patch bugs or respond to security reports. Transaction demarcation defects can cause data corruption, making unmaintained code in this area especially risky. Production use would make your team the de facto maintainer and should include a fork, test suite, and ownership plan.
- What are the alternatives to inneair/transaction-bundle in Laravel?
- Laravel's built-in DB::transaction, DB::beginTransaction/commit/rollback, transactionLevel, and afterCommit hooks cover most transaction demarcation needs without extra dependencies. You can wrap those primitives in your own small service or decorator for closure-based callbacks and retry rules. Maintained Laravel packages and first-party framework features are preferable to an archived Symfony bundle.