From ec97e023e4a29b0a753c40bf022c7a56f6818bb4 Mon Sep 17 00:00:00 2001 From: Nick Arciero <9964211+narciero@users.noreply.github.com> Date: Sat, 12 Nov 2022 19:10:01 -0700 Subject: [PATCH 1/2] update database version check for PlanetScale --- src/Illuminate/Queue/DatabaseQueue.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Queue/DatabaseQueue.php b/src/Illuminate/Queue/DatabaseQueue.php index 7fb9ff9cbabf..c7c182bedb30 100644 --- a/src/Illuminate/Queue/DatabaseQueue.php +++ b/src/Illuminate/Queue/DatabaseQueue.php @@ -261,7 +261,7 @@ protected function getLockForPopping() if (Str::of($databaseVersion)->contains('MariaDB')) { $databaseEngine = 'mariadb'; $databaseVersion = Str::before(Str::after($databaseVersion, '5.5.5-'), '-'); - } elseif (Str::of($databaseVersion)->contains('vitess')) { + } elseif (Str::of($databaseVersion)->contains('vitess') || Str::of($databaseVersion)->contains('PlanetScale')) { $databaseEngine = 'vitess'; $databaseVersion = Str::before($databaseVersion, '-'); } From 05384e4c1165f30728e9aae95d1f943c51d20fc2 Mon Sep 17 00:00:00 2001 From: Nick Arciero <9964211+narciero@users.noreply.github.com> Date: Sun, 13 Nov 2022 09:42:29 -0700 Subject: [PATCH 2/2] Simplify database version check --- src/Illuminate/Queue/DatabaseQueue.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Queue/DatabaseQueue.php b/src/Illuminate/Queue/DatabaseQueue.php index c7c182bedb30..bce025c53340 100644 --- a/src/Illuminate/Queue/DatabaseQueue.php +++ b/src/Illuminate/Queue/DatabaseQueue.php @@ -261,7 +261,7 @@ protected function getLockForPopping() if (Str::of($databaseVersion)->contains('MariaDB')) { $databaseEngine = 'mariadb'; $databaseVersion = Str::before(Str::after($databaseVersion, '5.5.5-'), '-'); - } elseif (Str::of($databaseVersion)->contains('vitess') || Str::of($databaseVersion)->contains('PlanetScale')) { + } elseif (Str::of($databaseVersion)->contains(['vitess', 'PlanetScale'])) { $databaseEngine = 'vitess'; $databaseVersion = Str::before($databaseVersion, '-'); }