8000 minor #37448 [Messenger] fix compatibility with Doctrine DBAL 3.0 (xa… · symfony/symfony@4e16dfd · GitHub
[go: up one dir, main page]

Skip to content

Commit 4e16dfd

Browse files
committed
minor #37448 [Messenger] fix compatibility with Doctrine DBAL 3.0 (xabbuh)
This PR was merged into the 4.4 branch. Discussion ---------- [Messenger] fix compatibility with Doctrine DBAL 3.0 | Q | A | ------------- | --- | Branch? | 5.0 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | see doctrine/dbal#4100 and doctrine/dbal#4125 Commits ------- b17df8c fix compatibility with Doctrine DBAL 3.0
2 parents 2729071 + b17df8c commit 4e16dfd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Symfony/Component/Messenger/Tests/Transport/Doctrine/DoctrineReceiverTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Component\Messenger\Tests\Transport\Doctrine;
1313

14+
use Doctrine\DBAL\Driver\PDO\Exception;
1415
use Doctrine\DBAL\Driver\PDOException;
1516
use Doctrine\DBAL\Exception\DeadlockException;
1617
use PHPUnit\Framework\TestCase;
@@ -75,7 +76,7 @@ public function testOccursRetryableExceptionFromConnection()
7576
{
7677
$serializer = $this->createSerializer();
7778
$connection = $this->createMock(Connection::class);
78-
$driverException = new PDOException(new \PDOException('Deadlock', 40001));
79+
$driverException = class_exists(Exception::class) ? Exception::new(new \PDOException('Deadlock', 40001)) : new PDOException(new \PDOException('Deadlock', 40001));
7980
$connection->method('get')->willThrowException(new DeadlockException('Deadlock', $driverException));
8081
$receiver = new DoctrineReceiver($connection, $serializer);
8182
$this->assertSame([], $receiver->get());

0 commit comments

Comments
 (0)
0