Skip to content

Commit 40c4c5a

Browse files
Merge branch '5.4' into 6.0
* 5.4: Avoid duplicated session listener registration in tests [HttpFoundation] fix SessionHandlerFactory using connections [gha] swap the php versions we use in jobs [DoctrineBridge] fix calling get_class on non-object Update PR template ResponseListener needs only 2 parameters [Lock] create lock table if it does not exist [HttpClient] Fix handling error info in MockResponse [SecurityBundle] Fix invalid reference with `always_authenticate_before_granting` Bump Symfony version to 5.4.1 Update VERSION for 5.4.0 Update CHANGELOG for 5.4.0
2 parents ee6baa8 + 53097eb commit 40c4c5a

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

Store/DoctrineDbalStore.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Doctrine\DBAL\Connection;
1515
use Doctrine\DBAL\DriverManager;
1616
use Doctrine\DBAL\Exception as DBALException;
17+
use Doctrine\DBAL\Exception\TableNotFoundException;
1718
use Doctrine\DBAL\ParameterType;
1819
use Doctrine\DBAL\Schema\Schema;
1920
use Symfony\Component\Lock\Exception\InvalidArgumentException;
@@ -88,6 +89,9 @@ public function save(Key $key)
8889
ParameterType::STRING,
8990
ParameterType::STRING,
9091
]);
92+
} catch (TableNotFoundException $e) {
93+
$this->createTable();
94+
$this->save($key);
9195
} catch (DBALException $e) {
9296
// the lock is already acquired. It could be us. Let's try to put off.
9397
$this->putOffExpiration($key, $this->initialTtl);

Tests/Store/DoctrineDbalStoreTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ public function testDsn(string $dsn, string $file = null)
7070

7171
try {
7272
$store = new DoctrineDbalStore($dsn);
73-
$store->createTable();
7473

7574
$store->save($key);
7675
$this->assertTrue($store->exists($key));

Tests/Store/PdoStoreTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ public function testDsn(string $dsn, string $file = null)
8484

8585
try {
8686
$store = new PdoStore($dsn);
87-
$store->createTable();
8887

8988
$store->save($key);
9089
$this->assertTrue($store->exists($key));

0 commit comments

Comments
 (0)