orm icon indicating copy to clipboard operation
orm copied to clipboard

Fix incorrect handling of transactions using deferred constraints

Open grongor opened this issue 7 years ago • 11 comments

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 )

grongor avatar Jan 04 '19 15:01 grongor

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 )

grongor avatar Jan 04 '19 16:01 grongor

This looks like a much better approach than the one we discussed before: nice!

Ocramius avatar Jan 04 '19 16:01 Ocramius

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?

Ocramius avatar Jan 04 '19 16:01 Ocramius

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 :)

grongor avatar Jan 04 '19 16:01 grongor

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.

Ocramius avatar Jan 04 '19 16:01 Ocramius

This is quite good for 2.7.0 just needs a rebase and the dependency bump on DBAL.

lcobucci avatar Nov 15 '19 13:11 lcobucci

@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 avatar Nov 15 '19 23:11 lcobucci

@lcobucci is this superseded by https://github.com/doctrine/dbal/pull/3424?

simPod avatar Aug 16 '21 06:08 simPod

@simPod it's been a while but that's correct. The challenge is to find a cross-platform implementation (that's well tested).

lcobucci avatar Aug 16 '21 14:08 lcobucci

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.

github-actions[bot] avatar Dec 31 '24 03:12 github-actions[bot]

Fixed in https://github.com/doctrine/dbal/pull/6545

simPod avatar Jan 05 '25 22:01 simPod

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.

github-actions[bot] avatar Apr 11 '25 03:04 github-actions[bot]

This pull request was closed due to inactivity.

github-actions[bot] avatar Apr 19 '25 03:04 github-actions[bot]