Comments (5)
Okay I found the issue was with the default configuration. I'm going to keep this bug open since it's terribly documented. In order for the module to work as suggested in the documentation from scratch, the dbTransactionEnabled
config option should be false
by default, not true.
What would be the ideal solution in this case, updating the documentation and mentioning the dbTransactionEnabled
option, or just changing it's default behaviour?
from balance.
Unable to reproduce both with unit tests and with manual test at live project.
Unit test for BalanceDb
is run with default config: dbTransactionEnabled
equals true
and dbTransactionNestedEnabled
equals false - without any issue. See:
https://github.com/illuminatech/balance/blob/1.3.0/tests/BalanceDbTest.php
If you experience the problem, then open a PR with failiing unit test, which reproduces it.
Transaction related options are documented properly:
https://github.com/illuminatech/balance/blob/1.3.0/src/BalanceDbTransaction.php#L24-L36
However, there is always room for the improvement. If you have a suggestion about how the docs could enhanced - open a separated PR, so I can consider it.
from balance.
Most likely you are executing Balance::increase()
within open DB transaction, which is then not committed explicitly or rollbacked at some point.
from balance.
@klimov-paul the issue persists, as long as I have dbTransactionEnabled
turned on, whenever I want to create a transaction, it never gets written, if it gets called outside of a transaction. Is that expected behaviour?
from balance.
If you are able to reproduce the issue - write down the unit test, which illustrates it.
from balance.
Related Issues (7)
- Auto account creation HOT 1
- Balance_accounts balance not updating HOT 1
- Managing multiple currency HOT 1
- Support for Laravel 5.6 HOT 1
- Usage with Database Transaction HOT 3
- Multiple balance service. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from balance.