Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR#7291 Incorrectly made transaction required for EntityManager::find() with optimistic locking #7366

Closed
timdev opened this issue Aug 22, 2018 · 1 comment
Assignees
Milestone

Comments

@timdev
Copy link
Contributor

timdev commented Aug 22, 2018

BC Break Report

Q A
BC Break yes
Version 2.6.2

Summary

2.6.2 introduced a BC break when using OPTIMISTIC locking.

See: #7291 (comment)

Previous behavior

EntityManager::find() with LockMode LockMode::OPTIMISTIC worked outside of a transaction.

Current behavior

Calling EntityManager::find() with LockMode::OPTIMISTIC outside of a transaction throws a TransactionRequiredException

How to reproduce

// In ORM 2.6.2
$entityManager->find(MyEntity::class, $id, \Doctrine\DBAL\LockMode::OPTIMISTIC);
timdev added a commit to timdev/doctrine2 that referenced this issue Aug 22, 2018
timdev added a commit to timdev/doctrine2 that referenced this issue Aug 22, 2018
Majkl578 pushed a commit to timdev/doctrine2 that referenced this issue Sep 23, 2018
Majkl578 pushed a commit to Majkl578/doctrine-orm that referenced this issue Sep 23, 2018
@Majkl578 Majkl578 added this to the 2.6.3 milestone Sep 23, 2018
@Majkl578 Majkl578 self-assigned this Sep 23, 2018
@Majkl578
Copy link
Contributor

Fixed by #7367, will land in 2.6.3.

Majkl578 pushed a commit to Majkl578/doctrine-orm that referenced this issue Sep 23, 2018
maglnet pushed a commit to maglnet/doctrine2 that referenced this issue Oct 10, 2018
guilhermeblanco pushed a commit that referenced this issue Jun 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants