Skip to content

Commit 622b41c

Browse files
committed
(fix): replace removed setRelationshipHook with addHook after merge
1 parent f1ed3a2 commit 622b41c

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

tests/e2e/Adapter/Base.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
use Tests\E2E\Adapter\Scopes\SpatialTests;
1919
use Tests\E2E\Adapter\Scopes\VectorTests;
2020
use Utopia\Database\Database;
21-
use Utopia\Database\Hook\RelationshipHandler;
21+
use Utopia\Database\Hook\Relationships;
2222
use Utopia\Database\Validator\Authorization;
2323

2424
\ini_set('memory_limit', '2048M');
@@ -62,7 +62,7 @@ protected function setUp(): void
6262

6363
$db = $this->getDatabase();
6464
if ($db->getRelationshipHook() === null) {
65-
$db->setRelationshipHook(new RelationshipHandler($db));
65+
$db->addHook(new Relationships($db));
6666
}
6767
}
6868

tests/unit/Relationships/RelationshipValidationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
use Utopia\Database\Helpers\ID;
2020
use Utopia\Database\Helpers\Permission;
2121
use Utopia\Database\Helpers\Role;
22-
use Utopia\Database\Hook\RelationshipHandler;
22+
use Utopia\Database\Hook\Relationships;
2323
use Utopia\Database\Operator;
2424
use Utopia\Database\Relationship;
2525
use Utopia\Database\RelationType;
@@ -161,7 +161,7 @@ function (Document $col, string $docId) use ($meta, $colMap, $documents) {
161161
$database->getAuthorization()->addRole(Role::any()->toString());
162162

163163
if ($withRelationshipHook) {
164-
$database->setRelationshipHook(new RelationshipHandler($database));
164+
$database->addHook(new Relationships($database));
165165
}
166166

167167
return $database;

0 commit comments

Comments
 (0)