Fix incorrect handling of transactions using deferred constraints
| Q | A |
|---|---|
| Type | bug |
| BC Break | no |
| Fixed issues | #7555 |
Summary
Rollback called when outside of a transaction when using deferred constraints (PostgreSQL).
(I wasn't sure what branch to target, please tell me if I should change it :) Thanks )
Build will fail until we merge the DBAL changes. You can see successful build here https://travis-ci.org/grongor/doctrine2/builds/475297482 (it uses patched DBAL from here https://github.com/doctrine/dbal/pull/3424 )
This looks like a much better approach than the one we discussed before: nice!
Assuming doctrine/dbal#3424 can target 2.9.3, we need to bump the dependency constraint here. Since we can only bump it in a minor release, and 2.7 is closed for improvements (besides deprecations), I'm not sure if this should target 3.0.
/cc @doctrine/doctrinecore?
Shouldn't this be merged into older versions too, as this fixes a bug and is non-BC? Just saying ... I'm not familiar with your release schedules :)
Can't merge in older versions due to the dependency bump, and dependency bumps are off-limits for patch releases, unless it's a security issue.
This is quite good for 2.7.0 just needs a rebase and the dependency bump on DBAL.
@grongor @Ocramius I was wrong in my statement, DBAL still needs to be adjusted.
After talking to @morozov we've decided to pursue a simpler solution than the one proposed in https://github.com/doctrine/dbal/pull/3424 (basically a try/finally in the Connection#commit()). I'll create a PR for that adding the necessary cross-platform tests.
However, DBAL 2.9 isn't maintained any longer and 2.10 requires PHP 7.2. Since we want to have ORM 2.7.0 out ASAP due to SF5 support I'll push this to ORM 2.8.0.
I hope you understand my decision :heart:
@lcobucci is this superseded by https://github.com/doctrine/dbal/pull/3424?
@simPod it's been a while but that's correct. The challenge is to find a cross-platform implementation (that's well tested).
There hasn't been any activity on this pull request in the past 90 days, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days. If you want to continue working on it, please leave a comment.
Fixed in https://github.com/doctrine/dbal/pull/6545
There hasn't been any activity on this pull request in the past 90 days, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days. If you want to continue working on it, please leave a comment.
This pull request was closed due to inactivity.