Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

De-deprecate transaction handling methods #376

merged 1 commit into from Jul 4, 2012


None yet
4 participants

lstrojny commented Jun 16, 2012

As discussed with @beberlei over IRC, deprecating transaction handling methods make the API cleaner but testing of Entity Manager dependent components much messier. Also suggesting to use $em->getConnection()->beginTransaction() feels like a violation of the law of demeter.

Therefore this pull request would remove the deprecation warnings from EntityManager::beginTransaction(), EntityManager::commit(), EntityManager::rollback().

This pull request fails (merged 3881e12 into 27b4f58).


guilhermeblanco commented Jun 17, 2012

I wouldn't touch the transaction API on EntityManager until we really have a true Transactional API around ORM. I already discussed with @beberlei a couple of times, because it heavily impacts on UnitOfWork.
One thing to remember is that ORM Transactional is totally different from DBAL Transactional. The ORM Transactional keeps the visited nodes and allows modifications over them. Until now, we can only rely on event onFlush to be able to modify nodes, which is terrible. We need to completely work around this supporting a better Transaction API on ORM, working at the top of DBAL Transaction during commit in UoW.


lstrojny commented Jun 17, 2012

@guilhermeblanco just to clarify: are you talking about cross-datasource transactions unrelated to what relational databases usually offer and how what that affect what is currently available as database specific transactional controls?


beberlei commented Jun 18, 2012

No, in general the Transactional API has some flaws at the moment that we want to adress at some point.

@beberlei beberlei added a commit that referenced this pull request Jul 4, 2012

@beberlei beberlei Merge pull request #376 from lstrojny/de-deprecate-transaction-methods
De-deprecate transaction handling methods

@beberlei beberlei merged commit da331cd into doctrine:master Jul 4, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment