Skip to content

Commit c6d4016

Browse files
committed
Replace the removed method
1 parent d5afeff commit c6d4016

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pkg/job-queue/Doctrine/JobStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public function saveJob(Job $job, ?\Closure $lockCallback = null)
136136
throw new \LogicException('Is not possible to create new job with lock, only update is allowed');
137137
}
138138

139-
$this->getEntityManager()->transactional(function (EntityManager $em) use ($job, $lockCallback) {
139+
$this->getEntityManager()->wrapInTransaction(function (EntityManager $em) use ($job, $lockCallback) {
140140
/** @var Job $job */
141141
$job = $this->getEntityRepository()->find($job->getId(), LockMode::PESSIMISTIC_WRITE);
142142

pkg/job-queue/Tests/Doctrine/JobStorageTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public function testShouldSaveJobWithoutLockIfThereIsNoCallbackAndChildJob()
170170
;
171171
$em
172172
->expects($this->never())
173-
->method('transactional')
173+
->method('wrapInTransaction')
174174
;
175175
$em
176176
->expects($this->any())
@@ -224,7 +224,7 @@ public function testShouldSaveJobWithLockIfWithCallback()
224224
;
225225
$em
226226
->expects($this->once())
227-
->method('transactional')
227+
->method('wrapInTransaction')
228228
;
229229
$em
230230
->expects($this->any())
@@ -387,7 +387,7 @@ public function testShouldLockEntityAndPassNewInstanceIntoCallback()
387387
;
388388
$em
389389
->expects($this->once())
390-
->method('transactional')
390+
->method('wrapInTransaction')
391391
->willReturnCallback(function ($callback) use ($em) {
392392
$callback($em);
393393
})
@@ -536,7 +536,7 @@ public function testShouldDeleteRecordFromUniqueTableIfJobIsUniqueAndStoppedAtIs
536536
;
537537
$em
538538
->expects($this->once())
539-
->method('transactional')
539+
->method('wrapInTransaction')
540540
->willReturnCallback(function ($callback) use ($em) {
541541
$callback($em);
542542
})

0 commit comments

Comments
 (0)