Closed
Description
- Laravel Version: master (is a "feature" since [5.2] Transaction count cannot be negative #14085 / 5.2)
- PHP Version: irrelevant
- Database Driver & Version: irrelevant
Description:
framework/src/Illuminate/Database/Concerns/ManagesTransactions.php
Lines 154 to 163 in e778e32
In cases where the user calls commit()
more often than beginTransaction()
(e.g. because beginTransaction()
is removed by accident) the user will never notice.
This method should throw an exception instead, because otherwise the user will never notice (that the transaction has been committed to early or that no transaction is active at all).
@GrahamCampbell already pointed to that issue in #12382 and #14085 but was ignored...