diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 16747b3cd..ee7dc076d 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -46,6 +46,7 @@ use Utopia\Database\Validator\Query\Limit; use Utopia\Database\Validator\Query\Offset; use Utopia\Database\Validator\UID; use Utopia\Locale\Locale; +use Utopia\System\System; use Utopia\Validator\ArrayList; use Utopia\Validator\Assoc; use Utopia\Validator\Boolean; @@ -53,7 +54,6 @@ use Utopia\Validator\Host; use Utopia\Validator\Text; use Utopia\Validator\URL; use Utopia\Validator\WhiteList; -use Utopia\System\System; $oauthDefaultSuccess = '/auth/oauth2/success'; $oauthDefaultFailure = '/auth/oauth2/failure'; diff --git a/app/controllers/api/avatars.php b/app/controllers/api/avatars.php index acf08c6b9..fb4439344 100644 --- a/app/controllers/api/avatars.php +++ b/app/controllers/api/avatars.php @@ -17,13 +17,13 @@ use Utopia\Domains\Domain; use Utopia\Image\Image; use Utopia\Logger\Log; use Utopia\Logger\Logger; +use Utopia\System\System; use Utopia\Validator\Boolean; use Utopia\Validator\HexColor; use Utopia\Validator\Range; use Utopia\Validator\Text; use Utopia\Validator\URL; use Utopia\Validator\WhiteList; -use Utopia\System\System; $avatarCallback = function (string $type, string $code, int $width, int $height, int $quality, Response $response) { diff --git a/app/controllers/api/console.php b/app/controllers/api/console.php index c23eb398d..82d7c7559 100644 --- a/app/controllers/api/console.php +++ b/app/controllers/api/console.php @@ -4,8 +4,8 @@ use Appwrite\Extend\Exception; use Appwrite\Utopia\Response; use Utopia\App; use Utopia\Database\Document; -use Utopia\Validator\Text; use Utopia\System\System; +use Utopia\Validator\Text; App::init() ->groups(['console']) diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index dbb45c721..ed5af1d38 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -40,6 +40,7 @@ use Utopia\Storage\Validator\FileExt; use Utopia\Storage\Validator\FileSize; use Utopia\Storage\Validator\Upload; use Utopia\Swoole\Request; +use Utopia\System\System; use Utopia\Validator\ArrayList; use Utopia\Validator\Assoc; use Utopia\Validator\Boolean; @@ -48,7 +49,6 @@ use Utopia\Validator\Text; use Utopia\Validator\WhiteList; use Utopia\VCS\Adapter\Git\GitHub; use Utopia\VCS\Exception\RepositoryNotFound; -use Utopia\System\System; include_once __DIR__ . '/../shared/api.php'; diff --git a/app/controllers/api/graphql.php b/app/controllers/api/graphql.php index 840149b7d..f79f433b5 100644 --- a/app/controllers/api/graphql.php +++ b/app/controllers/api/graphql.php @@ -17,9 +17,9 @@ use Swoole\Coroutine\WaitGroup; use Utopia\App; use Utopia\Database\Document; use Utopia\Database\Validator\Authorization; +use Utopia\System\System; use Utopia\Validator\JSON; use Utopia\Validator\Text; -use Utopia\System\System; App::init() ->groups(['graphql']) diff --git a/app/controllers/api/health.php b/app/controllers/api/health.php index a84c26c91..c215a78a8 100644 --- a/app/controllers/api/health.php +++ b/app/controllers/api/health.php @@ -15,12 +15,12 @@ use Utopia\Registry\Registry; use Utopia\Storage\Device; use Utopia\Storage\Device\Local; use Utopia\Storage\Storage; +use Utopia\System\System; use Utopia\Validator\Domain; use Utopia\Validator\Integer; use Utopia\Validator\Multiple; use Utopia\Validator\Text; use Utopia\Validator\WhiteList; -use Utopia\System\System; App::get('/v1/health') ->desc('Get HTTP') diff --git a/app/controllers/api/messaging.php b/app/controllers/api/messaging.php index d2359970d..33288a8bb 100644 --- a/app/controllers/api/messaging.php +++ b/app/controllers/api/messaging.php @@ -37,6 +37,7 @@ use Utopia\Database\Validator\Query\Offset; use Utopia\Database\Validator\Roles; use Utopia\Database\Validator\UID; use Utopia\Locale\Locale; +use Utopia\System\System; use Utopia\Validator\ArrayList; use Utopia\Validator\Boolean; use Utopia\Validator\Integer; @@ -44,7 +45,6 @@ use Utopia\Validator\JSON; use Utopia\Validator\Range; use Utopia\Validator\Text; use Utopia\Validator\WhiteList; -use Utopia\System\System; use function Swoole\Coroutine\batch; diff --git a/app/controllers/api/migrations.php b/app/controllers/api/migrations.php index bb5b0ee67..3899b26ad 100644 --- a/app/controllers/api/migrations.php +++ b/app/controllers/api/migrations.php @@ -21,13 +21,13 @@ use Utopia\Migration\Sources\Appwrite; use Utopia\Migration\Sources\Firebase; use Utopia\Migration\Sources\NHost; use Utopia\Migration\Sources\Supabase; +use Utopia\System\System; use Utopia\Validator\ArrayList; use Utopia\Validator\Host; use Utopia\Validator\Integer; use Utopia\Validator\Text; use Utopia\Validator\URL; use Utopia\Validator\WhiteList; -use Utopia\System\System; include_once __DIR__ . '/../shared/api.php'; diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 7b48f3102..cb75b76da 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -30,6 +30,7 @@ use Utopia\Database\Validator\UID; use Utopia\Domains\Validator\PublicDomain; use Utopia\Locale\Locale; use Utopia\Pools\Group; +use Utopia\System\System; use Utopia\Validator\ArrayList; use Utopia\Validator\Boolean; use Utopia\Validator\Hostname; @@ -39,7 +40,6 @@ use Utopia\Validator\Range; use Utopia\Validator\Text; use Utopia\Validator\URL; use Utopia\Validator\WhiteList; -use Utopia\System\System; App::init() ->groups(['projects']) diff --git a/app/controllers/api/proxy.php b/app/controllers/api/proxy.php index 6324234aa..1dfbc0ba0 100644 --- a/app/controllers/api/proxy.php +++ b/app/controllers/api/proxy.php @@ -16,10 +16,10 @@ use Utopia\Database\Query; use Utopia\Database\Validator\UID; use Utopia\Domains\Domain; use Utopia\Logger\Log; +use Utopia\System\System; use Utopia\Validator\Domain as ValidatorDomain; use Utopia\Validator\Text; use Utopia\Validator\WhiteList; -use Utopia\System\System; App::post('/v1/proxy/rules') ->groups(['api', 'proxy']) diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 4180cd595..97a0eb488 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -39,13 +39,13 @@ use Utopia\Storage\Validator\FileExt; use Utopia\Storage\Validator\FileSize; use Utopia\Storage\Validator\Upload; use Utopia\Swoole\Request; +use Utopia\System\System; use Utopia\Validator\ArrayList; use Utopia\Validator\Boolean; use Utopia\Validator\HexColor; use Utopia\Validator\Range; use Utopia\Validator\Text; use Utopia\Validator\WhiteList; -use Utopia\System\System; App::post('/v1/storage/buckets') ->desc('Create bucket') diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 27a0a7309..4cb2eb331 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -37,11 +37,11 @@ use Utopia\Database\Validator\Query\Limit; use Utopia\Database\Validator\Query\Offset; use Utopia\Database\Validator\UID; use Utopia\Locale\Locale; +use Utopia\System\System; use Utopia\Validator\ArrayList; use Utopia\Validator\Assoc; use Utopia\Validator\Host; use Utopia\Validator\Text; -use Utopia\System\System; App::post('/v1/teams') ->desc('Create team') diff --git a/app/controllers/api/vcs.php b/app/controllers/api/vcs.php index 25ba5b015..382689a2c 100644 --- a/app/controllers/api/vcs.php +++ b/app/controllers/api/vcs.php @@ -32,12 +32,12 @@ use Utopia\Detector\Adapter\Python; use Utopia\Detector\Adapter\Ruby; use Utopia\Detector\Adapter\Swift; use Utopia\Detector\Detector; +use Utopia\System\System; use Utopia\Validator\Boolean; use Utopia\Validator\Host; use Utopia\Validator\Text; use Utopia\VCS\Adapter\Git\GitHub; use Utopia\VCS\Exception\RepositoryNotFound; -use Utopia\System\System; use function Swoole\Coroutine\batch; diff --git a/app/controllers/general.php b/app/controllers/general.php index 31607e658..7cd52d60e 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -30,9 +30,9 @@ use Utopia\Locale\Locale; use Utopia\Logger\Log; use Utopia\Logger\Log\User; use Utopia\Logger\Logger; +use Utopia\System\System; use Utopia\Validator\Hostname; use Utopia\Validator\Text; -use Utopia\System\System; Config::setParam('domainVerification', false); Config::setParam('cookieDomain', 'localhost'); diff --git a/app/controllers/mock.php b/app/controllers/mock.php index 4dcaff197..6679fa14f 100644 --- a/app/controllers/mock.php +++ b/app/controllers/mock.php @@ -12,11 +12,11 @@ use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; use Utopia\Database\Validator\UID; +use Utopia\System\System; use Utopia\Validator\Host; use Utopia\Validator\Text; use Utopia\Validator\WhiteList; use Utopia\VCS\Adapter\Git\GitHub; -use Utopia\System\System; App::get('/v1/mock/tests/general/oauth2') ->desc('OAuth Login') diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 1d583e035..7c2f08c70 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -26,8 +26,8 @@ use Utopia\Database\DateTime; use Utopia\Database\Document; use Utopia\Database\Helpers\Role; use Utopia\Database\Validator\Authorization; -use Utopia\Validator\WhiteList; use Utopia\System\System; +use Utopia\Validator\WhiteList; $parseLabel = function (string $label, array $responsePayload, array $requestParams, Document $user) { preg_match_all('/{(.*?)}/', $label, $matches); diff --git a/app/init.php b/app/init.php index 080b5c469..5877327ab 100644 --- a/app/init.php +++ b/app/init.php @@ -77,13 +77,13 @@ use Utopia\Storage\Device\Local; use Utopia\Storage\Device\S3; use Utopia\Storage\Device\Wasabi; use Utopia\Storage\Storage; +use Utopia\System\System; use Utopia\Validator\Hostname; use Utopia\Validator\IP; use Utopia\Validator\Range; use Utopia\Validator\URL; use Utopia\Validator\WhiteList; use Utopia\VCS\Adapter\Git\GitHub as VcsGitHub; -use Utopia\System\System; const APP_NAME = 'Appwrite'; const APP_DOMAIN = 'appwrite.io'; diff --git a/app/realtime.php b/app/realtime.php index 9fb78e939..faebb1d19 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -27,9 +27,9 @@ use Utopia\Database\Helpers\Role; use Utopia\Database\Query; use Utopia\Database\Validator\Authorization; use Utopia\Logger\Log; +use Utopia\System\System; use Utopia\WebSocket\Adapter; use Utopia\WebSocket\Server; -use Utopia\System\System; /** * @var \Utopia\Registry\Registry $register diff --git a/src/Appwrite/Platform/Tasks/CalcTierStats.php b/src/Appwrite/Platform/Tasks/CalcTierStats.php index 8c2911491..2d7dd3403 100644 --- a/src/Appwrite/Platform/Tasks/CalcTierStats.php +++ b/src/Appwrite/Platform/Tasks/CalcTierStats.php @@ -13,8 +13,8 @@ use Utopia\Database\Validator\Authorization; use Utopia\Platform\Action; use Utopia\Pools\Group; use Utopia\Registry\Registry; -use Utopia\Validator\Text; use Utopia\System\System; +use Utopia\Validator\Text; class CalcTierStats extends Action { diff --git a/src/Appwrite/Platform/Tasks/SSL.php b/src/Appwrite/Platform/Tasks/SSL.php index f4f90edfc..5af0cb6cd 100644 --- a/src/Appwrite/Platform/Tasks/SSL.php +++ b/src/Appwrite/Platform/Tasks/SSL.php @@ -6,9 +6,9 @@ use Appwrite\Event\Certificate; use Utopia\CLI\Console; use Utopia\Database\Document; use Utopia\Platform\Action; +use Utopia\System\System; use Utopia\Validator\Boolean; use Utopia\Validator\Hostname; -use Utopia\System\System; class SSL extends Action { diff --git a/src/Appwrite/Platform/Tasks/Specs.php b/src/Appwrite/Platform/Tasks/Specs.php index 33151a514..114e12ac8 100644 --- a/src/Appwrite/Platform/Tasks/Specs.php +++ b/src/Appwrite/Platform/Tasks/Specs.php @@ -18,9 +18,9 @@ use Utopia\Database\Database; use Utopia\Platform\Action; use Utopia\Registry\Registry; use Utopia\Request; +use Utopia\System\System; use Utopia\Validator\Text; use Utopia\Validator\WhiteList; -use Utopia\System\System; class Specs extends Action { diff --git a/src/Appwrite/Platform/Workers/Builds.php b/src/Appwrite/Platform/Workers/Builds.php index f78ef971d..ff1c439aa 100644 --- a/src/Appwrite/Platform/Workers/Builds.php +++ b/src/Appwrite/Platform/Workers/Builds.php @@ -26,8 +26,8 @@ use Utopia\Platform\Action; use Utopia\Queue\Message; use Utopia\Storage\Device; use Utopia\Storage\Device\Local; -use Utopia\VCS\Adapter\Git\GitHub; use Utopia\System\System; +use Utopia\VCS\Adapter\Git\GitHub; class Builds extends Action { diff --git a/tests/e2e/Services/VCS/VCSConsoleClientTest.php b/tests/e2e/Services/VCS/VCSConsoleClientTest.php index 3ac0d64d6..f109e250b 100644 --- a/tests/e2e/Services/VCS/VCSConsoleClientTest.php +++ b/tests/e2e/Services/VCS/VCSConsoleClientTest.php @@ -10,8 +10,8 @@ use Utopia\Cache\Adapter\None; use Utopia\Cache\Cache; use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Role; -use Utopia\VCS\Adapter\Git\GitHub; use Utopia\System\System; +use Utopia\VCS\Adapter\Git\GitHub; class VCSConsoleClientTest extends Scope {