mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-07 07:43:12 +08:00
Replaced deprecated transactional function with wrapTransaction
This commit is contained in:
@@ -39,7 +39,7 @@ class UrlShortener implements UrlShortenerInterface
|
||||
/** @var ShortUrlMeta $meta */
|
||||
$meta = $this->titleResolutionHelper->processTitleAndValidateUrl($meta);
|
||||
|
||||
return $this->em->transactional(function () use ($meta) {
|
||||
return $this->em->wrapInTransaction(function () use ($meta) {
|
||||
$shortUrl = ShortUrl::fromMeta($meta, $this->relationResolver);
|
||||
|
||||
$this->verifyShortCodeUniqueness($meta, $shortUrl);
|
||||
|
||||
@@ -39,7 +39,7 @@ class UrlShortenerTest extends TestCase
|
||||
[$shortUrl] = $arguments;
|
||||
$shortUrl->setId('10');
|
||||
});
|
||||
$this->em->transactional(Argument::type('callable'))->will(function (array $args) {
|
||||
$this->em->wrapInTransaction(Argument::type('callable'))->will(function (array $args) {
|
||||
/** @var callable $callback */
|
||||
[$callback] = $args;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user