Skip to content

Commit

Permalink
minor #51624 [Messenger] Fix DoctrineIntegrationTest (derrabus)
Browse files Browse the repository at this point in the history
This PR was merged into the 6.4 branch.

Discussion
----------

[Messenger] Fix DoctrineIntegrationTest

| Q             | A
| ------------- | ---
| Branch?       | 6.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Follows #51615
| License       | MIT
| Doc PR        | N/A

Fixes a DBAL 2 incompatibility introduced by #51615.

Commits
-------

c980956 [Messenger] Fix DoctrineIntegrationTest
  • Loading branch information
derrabus committed Sep 11, 2023
2 parents 55582fd + c980956 commit d8a4b3c
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,14 @@ public function testSendWithDelay()
{
$this->connection->send('{"message": "Hi i am delayed"}', ['type' => DummyMessage::class], 600000);

$result = $this->driverConnection->createQueryBuilder()
$qb = $this->driverConnection->createQueryBuilder()
->select('m.available_at')
->from('messenger_messages', 'm')
->where('m.body = :body')
->setParameter('body', '{"message": "Hi i am delayed"}')
->executeQuery();
->setParameter('body', '{"message": "Hi i am delayed"}');

// DBAL 2 compatibility
$result = method_exists($qb, 'executeQuery') ? $qb->executeQuery() : $qb->execute();

$available_at = new \DateTimeImmutable($result->fetchOne());

Expand Down

0 comments on commit d8a4b3c

Please sign in to comment.