Skip to content

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

@timdev

Description

@timdev

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions