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