(fix): alias Spatial feature import to avoid name collision with Validator\Spatial

This commit is contained in:
Jake Barnby
2026-03-27 01:05:12 +13:00
parent a3b83a5d29
commit 85467e3d7e
6 changed files with 12 additions and 12 deletions
@@ -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.');
}
@@ -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.');
}
@@ -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.');
}
@@ -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.');
}
@@ -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.');
}
@@ -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.');
}