Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e93f016

Browse files
bug #47157 [Messenger] Fix Doctrine transport on MySQL (nicolas-grekas)
This PR was merged into the 4.4 branch. Discussion ---------- [Messenger] Fix Doctrine transport on MySQL | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #46351 | License | MIT | Doc PR | - Commits ------- 9da305a [Messenger] Fix Doctrine transport on MySQL
2 parents 23c6b9d + 9da305a commit e93f016

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Symfony/Component/Messenger/Transport/Doctrine/Connection.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public function get(): ?array
162162
{
163163
if ($this->driverConnection->getDatabasePlatform() instanceof MySQLPlatform) {
164164
try {
165-
$this->driverConnection->delete($this->configuration['table_name'], ['delivered_at' => '9999-12-31']);
165+
$this->driverConnection->delete($this->configuration['table_name'], ['delivered_at' => '9999-12-31 23:59:59']);
166166
} catch (DriverException $e) {
167167
// Ignore the exception
168168
}
@@ -252,7 +252,7 @@ public function ack(string $id): bool
252252
{
253253
try {
254254
if ($this->driverConnection->getDatabasePlatform() instanceof MySQLPlatform) {
255-
return $this->driverConnection->update($this->configuration['table_name'], ['delivered_at' => '9999-12-31'], ['id' => $id]) > 0;
255+
return $this->driverConnection->update($this->configuration['table_name'], ['delivered_at' => '9999-12-31 23:59:59'], ['id' => $id]) > 0;
256256
}
257257

258258
return $this->driverConnection->delete($this->configuration['table_name'], ['id' => $id]) > 0;
@@ -265,7 +265,7 @@ public function reject(string $id): bool
265265
{
266266
try {
267267
if ($this->driverConnection->getDatabasePlatform() instanceof MySQLPlatform) {
268-
return $this->driverConnection->update($this->configuration['table_name'], ['delivered_at' => '9999-12-31'], ['id' => $id]) > 0;
268+
return $this->driverConnection->update($this->configuration['table_name'], ['delivered_at' => '9999-12-31 23:59:59'], ['id' => $id]) > 0;
269269
}
270270

271271
return $this->driverConnection->delete($this->configuration['table_name'], ['id' => $id]) > 0;

0 commit comments

Comments
 (0)