From 85467e3d7ea48a018580dc6a6fbc321ff0b628e4 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Fri, 27 Mar 2026 01:05:12 +1300 Subject: [PATCH] (fix): alias Spatial feature import to avoid name collision with Validator\Spatial --- .../Http/Databases/Collections/Attributes/Line/Create.php | 4 ++-- .../Http/Databases/Collections/Attributes/Line/Update.php | 4 ++-- .../Http/Databases/Collections/Attributes/Point/Create.php | 4 ++-- .../Http/Databases/Collections/Attributes/Point/Update.php | 4 ++-- .../Http/Databases/Collections/Attributes/Polygon/Create.php | 4 ++-- .../Http/Databases/Collections/Attributes/Polygon/Update.php | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Line/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Line/Create.php index fc03e78e5d..2422255b4e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Line/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Line/Create.php @@ -11,7 +11,7 @@ use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Adapter\Feature\Spatial; +use Utopia\Database\Adapter\Feature\Spatial as SpatialFeature; use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Validator\Authorization; @@ -79,7 +79,7 @@ class Create extends Action public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?array $default, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents, Authorization $authorization): void { - if (!$dbForProject->getAdapter() instanceof Spatial) { + if (!$dbForProject->getAdapter() instanceof SpatialFeature) { throw new Exception(Exception::GENERAL_FEATURE_UNSUPPORTED, 'Spatial columns are not supported by this database.'); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Line/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Line/Update.php index b13841f6f1..1384ea994d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Line/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Line/Update.php @@ -11,7 +11,7 @@ use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Adapter\Feature\Spatial; +use Utopia\Database\Adapter\Feature\Spatial as SpatialFeature; use Utopia\Database\Database; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Key; @@ -79,7 +79,7 @@ class Update extends Action public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?array $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents, Authorization $authorization): void { - if (!$dbForProject->getAdapter() instanceof Spatial) { + if (!$dbForProject->getAdapter() instanceof SpatialFeature) { throw new Exception(Exception::GENERAL_FEATURE_UNSUPPORTED, 'Spatial columns are not supported by this database.'); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Point/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Point/Create.php index 3452064118..6a810728a9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Point/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Point/Create.php @@ -11,7 +11,7 @@ use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Adapter\Feature\Spatial; +use Utopia\Database\Adapter\Feature\Spatial as SpatialFeature; use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Validator\Authorization; @@ -79,7 +79,7 @@ class Create extends Action public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?array $default, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents, Authorization $authorization): void { - if (!$dbForProject->getAdapter() instanceof Spatial) { + if (!$dbForProject->getAdapter() instanceof SpatialFeature) { throw new Exception(Exception::GENERAL_FEATURE_UNSUPPORTED, 'Spatial columns are not supported by this database.'); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Point/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Point/Update.php index 8a1fdcbd34..e35ce1f4ef 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Point/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Point/Update.php @@ -11,7 +11,7 @@ use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Adapter\Feature\Spatial; +use Utopia\Database\Adapter\Feature\Spatial as SpatialFeature; use Utopia\Database\Database; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Key; @@ -79,7 +79,7 @@ class Update extends Action public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?array $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents, Authorization $authorization): void { - if (!$dbForProject->getAdapter() instanceof Spatial) { + if (!$dbForProject->getAdapter() instanceof SpatialFeature) { throw new Exception(Exception::GENERAL_FEATURE_UNSUPPORTED, 'Spatial columns are not supported by this database.'); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Polygon/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Polygon/Create.php index a724fa6311..77fcaaebf6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Polygon/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Polygon/Create.php @@ -11,7 +11,7 @@ use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Adapter\Feature\Spatial; +use Utopia\Database\Adapter\Feature\Spatial as SpatialFeature; use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Validator\Authorization; @@ -79,7 +79,7 @@ class Create extends Action public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?array $default, UtopiaResponse $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents, Authorization $authorization): void { - if (!$dbForProject->getAdapter() instanceof Spatial) { + if (!$dbForProject->getAdapter() instanceof SpatialFeature) { throw new Exception(Exception::GENERAL_FEATURE_UNSUPPORTED, 'Spatial columns are not supported by this database.'); } diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Polygon/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Polygon/Update.php index 0ebd898c96..babc4b2db0 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Polygon/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Polygon/Update.php @@ -11,7 +11,7 @@ use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; -use Utopia\Database\Adapter\Feature\Spatial; +use Utopia\Database\Adapter\Feature\Spatial as SpatialFeature; use Utopia\Database\Database; use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Key; @@ -79,7 +79,7 @@ class Update extends Action public function action(string $databaseId, string $collectionId, string $key, ?bool $required, ?array $default, ?string $newKey, UtopiaResponse $response, Database $dbForProject, Event $queueForEvents, Authorization $authorization): void { - if (!$dbForProject->getAdapter() instanceof Spatial) { + if (!$dbForProject->getAdapter() instanceof SpatialFeature) { throw new Exception(Exception::GENERAL_FEATURE_UNSUPPORTED, 'Spatial columns are not supported by this database.'); }