Skip to content

Commit af13c74

Browse files
committed
Use DBAL static methods instead of type registry
1 parent 7665f49 commit af13c74

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/Lib/TestCase.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,11 +263,10 @@ private function createEntityManager(
263263
$connection = DriverManager::getConnection(['driver' => 'pdo_sqlite'] + $driverOptions, $config);
264264
$entityManager = new EntityManager($connection, $config);
265265

266-
$typeRegistry = DbalType::getTypeRegistry();
267-
if ($typeRegistry->has(PrimaryKey::DOCTRINE_TYPE_NAME)) {
268-
$typeRegistry->override(PrimaryKey::DOCTRINE_TYPE_NAME, $primaryKey);
266+
if (DbalType::hasType(PrimaryKey::DOCTRINE_TYPE_NAME)) {
267+
DbalType::overrideType(PrimaryKey::DOCTRINE_TYPE_NAME, $primaryKey);
269268
} else {
270-
$typeRegistry->register(PrimaryKey::DOCTRINE_TYPE_NAME, $primaryKey);
269+
DbalType::addType(PrimaryKey::DOCTRINE_TYPE_NAME, $primaryKey);
271270
}
272271

273272
$schemaTool = new SchemaTool($entityManager);

0 commit comments

Comments
 (0)