From 4ddd4dadd9544747dd3cd37dd1305b6468eb7c8f Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 10 Sep 2023 12:30:32 +0000 Subject: [PATCH] update to app to Http --- app/cli.php | 2 +- app/config/runtimes-v2.php | 2 +- app/config/runtimes.php | 2 +- app/controllers/api/account.php | 2 +- app/controllers/api/avatars.php | 2 +- app/controllers/api/console.php | 2 +- app/controllers/api/databases.php | 2 +- app/controllers/api/functions.php | 2 +- app/controllers/api/graphql.php | 2 +- app/controllers/api/health.php | 2 +- app/controllers/api/locale.php | 2 +- app/controllers/api/migrations.php | 2 +- app/controllers/api/project.php | 2 +- app/controllers/api/projects.php | 2 +- app/controllers/api/proxy.php | 2 +- app/controllers/api/storage.php | 2 +- app/controllers/api/teams.php | 2 +- app/controllers/api/users.php | 2 +- app/controllers/api/vcs.php | 2 +- app/controllers/general.php | 2 +- app/controllers/mock.php | 2 +- app/controllers/shared/api.php | 2 +- app/controllers/shared/api/auth.php | 2 +- app/controllers/web/console.php | 2 +- app/controllers/web/home.php | 2 +- app/http.php | 6 +++--- app/init.php | 2 +- app/realtime.php | 6 +++--- app/worker.php | 2 +- app/workers/builds.php | 2 +- app/workers/certificates.php | 2 +- app/workers/deletes.php | 2 +- app/workers/functions.php | 2 +- app/workers/mails.php | 2 +- app/workers/messaging.php | 2 +- app/workers/webhooks.php | 2 +- src/Appwrite/GraphQL/Resolvers.php | 2 +- src/Appwrite/GraphQL/Schema.php | 2 +- src/Appwrite/GraphQL/Types/Mapper.php | 2 +- src/Appwrite/Messaging/Adapter/Realtime.php | 2 +- src/Appwrite/Migration/Migration.php | 2 +- src/Appwrite/Migration/Version/V15.php | 2 +- src/Appwrite/Migration/Version/V19.php | 2 +- src/Appwrite/Platform/Tasks/CalcTierStats.php | 4 ++-- src/Appwrite/Platform/Tasks/CalcUsersStats.php | 4 ++-- src/Appwrite/Platform/Tasks/Doctor.php | 2 +- src/Appwrite/Platform/Tasks/Hamster.php | 4 ++-- src/Appwrite/Platform/Tasks/Maintenance.php | 2 +- src/Appwrite/Platform/Tasks/Migrate.php | 4 ++-- .../Platform/Tasks/PatchDeleteProjectCollections.php | 4 ++-- src/Appwrite/Platform/Tasks/SSL.php | 2 +- src/Appwrite/Platform/Tasks/Schedule.php | 2 +- src/Appwrite/Platform/Tasks/Specs.php | 4 ++-- src/Appwrite/Platform/Tasks/Usage.php | 2 +- src/Appwrite/Platform/Tasks/Vars.php | 2 +- src/Appwrite/Platform/Tasks/Version.php | 2 +- src/Appwrite/Resque/Worker.php | 2 +- src/Appwrite/Specification/Format.php | 2 +- src/Appwrite/Usage/Calculators/TimeSeries.php | 2 +- src/Appwrite/Usage/Stats.php | 2 +- src/Appwrite/Vcs/Comment.php | 2 +- src/Executor/Executor.php | 2 +- tests/e2e/General/AbuseTest.php | 2 +- tests/e2e/Services/GraphQL/AbuseTest.php | 2 +- tests/unit/Event/EventTest.php | 2 +- tests/unit/Usage/StatsTest.php | 2 +- 66 files changed, 76 insertions(+), 76 deletions(-) diff --git a/app/cli.php b/app/cli.php index c8ebd089b1..259b40e8ee 100644 --- a/app/cli.php +++ b/app/cli.php @@ -8,7 +8,7 @@ use Appwrite\Platform\Appwrite; use Utopia\CLI\CLI; use Utopia\Database\Validator\Authorization; use Utopia\Platform\Service; -use Utopia\App; +use Utopia\Http\Http; use Utopia\CLI\Console; use Utopia\Cache\Adapter\Sharding; use Utopia\Cache\Cache; diff --git a/app/config/runtimes-v2.php b/app/config/runtimes-v2.php index c24aaa109e..3752d0849f 100644 --- a/app/config/runtimes-v2.php +++ b/app/config/runtimes-v2.php @@ -4,7 +4,7 @@ * List of Appwrite Cloud Functions supported runtimes */ -use Utopia\App; +use Utopia\Http\Http; use Appwrite\Runtimes\Runtimes; $runtimes = new Runtimes('v2'); diff --git a/app/config/runtimes.php b/app/config/runtimes.php index 2cd73c1b70..4fd763599c 100644 --- a/app/config/runtimes.php +++ b/app/config/runtimes.php @@ -4,7 +4,7 @@ * List of Appwrite Cloud Functions supported runtimes */ -use Utopia\App; +use Utopia\Http\Http; use Appwrite\Runtimes\Runtimes; $runtimes = new Runtimes('v3'); diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index ab6799ab3d..494a5349a9 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -24,7 +24,7 @@ use Utopia\Database\Validator\Query\Offset; use Appwrite\Utopia\Request; use Appwrite\Utopia\Response; use MaxMind\Db\Reader; -use Utopia\App; +use Utopia\Http\Http; use Utopia\Audit\Audit as EventAudit; use Utopia\Config\Config; use Utopia\Database\Database; diff --git a/app/controllers/api/avatars.php b/app/controllers/api/avatars.php index 3b93348643..6384444906 100644 --- a/app/controllers/api/avatars.php +++ b/app/controllers/api/avatars.php @@ -3,7 +3,7 @@ use Appwrite\Extend\Exception; use Appwrite\URL\URL as URLParse; use Appwrite\Utopia\Response; -use Utopia\App; +use Utopia\Http\Http; use Utopia\CLI\Console; use Utopia\Config\Config; use Utopia\Database\Database; diff --git a/app/controllers/api/console.php b/app/controllers/api/console.php index 1bd62a1d4c..3ef0dbd9cf 100644 --- a/app/controllers/api/console.php +++ b/app/controllers/api/console.php @@ -2,7 +2,7 @@ use Appwrite\Extend\Exception; use Appwrite\Utopia\Response; -use Utopia\App; +use Utopia\Http\Http; use Utopia\Database\Document; use Utopia\Validator\Text; diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index bf66e9fd8e..ff6dc90862 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -14,7 +14,7 @@ use Appwrite\Utopia\Database\Validator\Queries\Databases; use Appwrite\Utopia\Database\Validator\Queries\Indexes; use Appwrite\Utopia\Response; use MaxMind\Db\Reader; -use Utopia\App; +use Utopia\Http\Http; use Utopia\Audit\Audit; use Utopia\Config\Config; use Utopia\Database\Adapter\MariaDB; diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 1cabc77eb7..d0e9d4263f 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -29,7 +29,7 @@ use Appwrite\Task\Validator\Cron; use Appwrite\Utopia\Database\Validator\Queries\Deployments; use Appwrite\Utopia\Database\Validator\Queries\Executions; use Appwrite\Utopia\Database\Validator\Queries\Functions; -use Utopia\App; +use Utopia\Http\Http; use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\DateTime; diff --git a/app/controllers/api/graphql.php b/app/controllers/api/graphql.php index 8ee3b5ac47..9f604a1076 100644 --- a/app/controllers/api/graphql.php +++ b/app/controllers/api/graphql.php @@ -12,7 +12,7 @@ use GraphQL\Validator\Rules\DisableIntrospection; use GraphQL\Validator\Rules\QueryComplexity; use GraphQL\Validator\Rules\QueryDepth; use Swoole\Coroutine\WaitGroup; -use Utopia\App; +use Utopia\Http\Http; use Utopia\Database\Document; use Utopia\Validator\JSON; use Utopia\Validator\Text; diff --git a/app/controllers/api/health.php b/app/controllers/api/health.php index d6a2612f32..b510e678eb 100644 --- a/app/controllers/api/health.php +++ b/app/controllers/api/health.php @@ -4,7 +4,7 @@ use Appwrite\ClamAV\Network; use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\Utopia\Response; -use Utopia\App; +use Utopia\Http\Http; use Utopia\Config\Config; use Utopia\Database\Document; use Utopia\Pools\Group; diff --git a/app/controllers/api/locale.php b/app/controllers/api/locale.php index 29b4932543..649ccbaebc 100644 --- a/app/controllers/api/locale.php +++ b/app/controllers/api/locale.php @@ -3,7 +3,7 @@ use Appwrite\Utopia\Response; use Appwrite\Utopia\Request; use MaxMind\Db\Reader; -use Utopia\App; +use Utopia\Http\Http; use Utopia\Config\Config; use Utopia\Database\Document; use Utopia\Locale\Locale; diff --git a/app/controllers/api/migrations.php b/app/controllers/api/migrations.php index 83888fff2c..c98f4cc7f4 100644 --- a/app/controllers/api/migrations.php +++ b/app/controllers/api/migrations.php @@ -10,7 +10,7 @@ use Appwrite\Role; use Appwrite\Utopia\Database\Validator\Queries\Migrations; use Appwrite\Utopia\Request; use Appwrite\Utopia\Response; -use Utopia\App; +use Utopia\Http\Http; use Utopia\Database\Database; use Utopia\Database\DateTime; use Utopia\Database\Document; diff --git a/app/controllers/api/project.php b/app/controllers/api/project.php index bd8d9d5f73..0342b7eb18 100644 --- a/app/controllers/api/project.php +++ b/app/controllers/api/project.php @@ -2,7 +2,7 @@ use Appwrite\Extend\Exception; use Appwrite\Utopia\Response; -use Utopia\App; +use Utopia\Http\Http; use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Exception\Duplicate as DuplicateException; diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 11a9f8c558..384326a686 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -12,7 +12,7 @@ use Appwrite\Utopia\Database\Validator\Queries\Projects; use Appwrite\Utopia\Response; use PHPMailer\PHPMailer\PHPMailer; use Utopia\Abuse\Adapters\TimeLimit; -use Utopia\App; +use Utopia\Http\Http; use Utopia\Audit\Audit; use Utopia\Cache\Cache; use Utopia\Config\Config; diff --git a/app/controllers/api/proxy.php b/app/controllers/api/proxy.php index 1c0c929024..7b61c839c7 100644 --- a/app/controllers/api/proxy.php +++ b/app/controllers/api/proxy.php @@ -7,7 +7,7 @@ use Appwrite\Extend\Exception; use Appwrite\Network\Validator\CNAME; use Appwrite\Utopia\Database\Validator\Queries\Rules; use Appwrite\Utopia\Response; -use Utopia\App; +use Utopia\Http\Http; use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Helpers\ID; diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 60e474a7eb..ae9b17a0d7 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -8,7 +8,7 @@ use Appwrite\Event\Event; use Appwrite\Utopia\Database\Validator\CustomId; use Appwrite\OpenSSL\OpenSSL; use Appwrite\Utopia\Response; -use Utopia\App; +use Utopia\Http\Http; use Utopia\Config\Config; use Utopia\Database\Database; use Utopia\Database\Document; diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 2e263827a6..8dea76304a 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -20,7 +20,7 @@ use Utopia\Database\Validator\Query\Offset; use Appwrite\Utopia\Request; use Appwrite\Utopia\Response; use MaxMind\Db\Reader; -use Utopia\App; +use Utopia\Http\Http; use Utopia\Audit\Audit; use Utopia\Config\Config; use Utopia\Database\Database; diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index 00520ae8d7..3144cade06 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -14,7 +14,7 @@ use Appwrite\Utopia\Database\Validator\Queries\Users; use Utopia\Database\Validator\Query\Limit; use Utopia\Database\Validator\Query\Offset; use Appwrite\Utopia\Response; -use Utopia\App; +use Utopia\Http\Http; use Utopia\Audit\Audit; use Utopia\Config\Config; use Utopia\Database\Helpers\ID; diff --git a/app/controllers/api/vcs.php b/app/controllers/api/vcs.php index 67f59b9e40..6e8cef9efd 100644 --- a/app/controllers/api/vcs.php +++ b/app/controllers/api/vcs.php @@ -1,7 +1,7 @@ groups(['web']) diff --git a/app/controllers/web/home.php b/app/controllers/web/home.php index 27b2614c37..0e476aef32 100644 --- a/app/controllers/web/home.php +++ b/app/controllers/web/home.php @@ -1,7 +1,7 @@ on('start', function (Server $http) use ($payloadSize, $register) { - $app = new App('UTC'); + $app = new Http('UTC'); go(function () use ($register, $app) { $pools = $register->get('pools'); @@ -241,7 +241,7 @@ $http->on('request', function (SwooleRequest $swooleRequest, SwooleResponse $swo return; } - $app = new App('UTC'); + $app = new Http('UTC'); $pools = $register->get('pools'); App::setResource('pools', fn () => $pools); diff --git a/app/init.php b/app/init.php index 73044793e6..a657c2747f 100644 --- a/app/init.php +++ b/app/init.php @@ -33,7 +33,7 @@ use Appwrite\Network\Validator\Origin; use Appwrite\OpenSSL\OpenSSL; use Appwrite\URL\URL as AppwriteURL; use Appwrite\Usage\Stats; -use Utopia\App; +use Utopia\Http\Http; use Utopia\Logger\Logger; use Utopia\Cache\Adapter\Redis as RedisCache; use Utopia\Cache\Cache; diff --git a/app/realtime.php b/app/realtime.php index 25b0532b42..1bc3b29095 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -11,7 +11,7 @@ use Swoole\Table; use Swoole\Timer; use Utopia\Abuse\Abuse; use Utopia\Abuse\Adapters\TimeLimit; -use Utopia\App; +use Utopia\Http\Http; use Utopia\CLI\Console; use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Role; @@ -378,7 +378,7 @@ $server->onWorkerStart(function (int $workerId) use ($server, $register, $stats, }); $server->onOpen(function (int $connection, SwooleRequest $request) use ($server, $register, $stats, &$realtime, $logError) { - $app = new App('UTC'); + $app = new Http('UTC'); $request = new Request($request); $response = new Response(new SwooleResponse()); @@ -486,7 +486,7 @@ $server->onOpen(function (int $connection, SwooleRequest $request) use ($server, $server->onMessage(function (int $connection, string $message) use ($server, $register, $realtime, $containerId) { try { - $app = new App('UTC'); + $app = new Http('UTC'); $response = new Response(new SwooleResponse()); $projectId = $realtime->connections[$connection]['projectId']; $database = getConsoleDB(); diff --git a/app/worker.php b/app/worker.php index 51e42969f4..2edd2ac35c 100644 --- a/app/worker.php +++ b/app/worker.php @@ -6,7 +6,7 @@ use Appwrite\Event\Func; use Appwrite\Event\Usage; use Appwrite\Usage\Stats; use Swoole\Runtime; -use Utopia\App; +use Utopia\Http\Http; use Utopia\Cache\Adapter\Sharding; use Utopia\Cache\Cache; use Utopia\CLI\CLI; diff --git a/app/workers/builds.php b/app/workers/builds.php index 5f8ea9c4ce..0b6d90fff1 100644 --- a/app/workers/builds.php +++ b/app/workers/builds.php @@ -10,7 +10,7 @@ use Executor\Executor; use Appwrite\Usage\Stats; use Appwrite\Vcs\Comment; use Utopia\Database\DateTime; -use Utopia\App; +use Utopia\Http\Http; use Utopia\CLI\Console; use Utopia\Database\Helpers\ID; use Utopia\DSN\DSN; diff --git a/app/workers/certificates.php b/app/workers/certificates.php index d390ed442e..32a9178f6b 100644 --- a/app/workers/certificates.php +++ b/app/workers/certificates.php @@ -7,7 +7,7 @@ use Appwrite\Messaging\Adapter\Realtime; use Appwrite\Event\Event; use Appwrite\Resque\Worker; use Appwrite\Template\Template; -use Utopia\App; +use Utopia\Http\Http; use Utopia\CLI\Console; use Utopia\Database\Database; use Utopia\Database\Document; diff --git a/app/workers/deletes.php b/app/workers/deletes.php index f3968c07f2..9a32d631b8 100644 --- a/app/workers/deletes.php +++ b/app/workers/deletes.php @@ -2,7 +2,7 @@ use Appwrite\Auth\Auth; use Executor\Executor; -use Utopia\App; +use Utopia\Http\Http; use Utopia\Cache\Adapter\Filesystem; use Utopia\Cache\Cache; use Utopia\Database\Database; diff --git a/app/workers/functions.php b/app/workers/functions.php index 9fa1c7df16..161210e451 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -10,7 +10,7 @@ use Appwrite\Messaging\Adapter\Realtime; use Appwrite\Usage\Stats; use Appwrite\Utopia\Response\Model\Execution; use Executor\Executor; -use Utopia\App; +use Utopia\Http\Http; use Utopia\CLI\Console; use Utopia\Config\Config; use Utopia\Database\Database; diff --git a/app/workers/mails.php b/app/workers/mails.php index 56676b4aed..55a5e96521 100644 --- a/app/workers/mails.php +++ b/app/workers/mails.php @@ -2,7 +2,7 @@ use Appwrite\Resque\Worker; use Appwrite\Template\Template; -use Utopia\App; +use Utopia\Http\Http; use Utopia\CLI\Console; use PHPMailer\PHPMailer\PHPMailer; diff --git a/app/workers/messaging.php b/app/workers/messaging.php index 5732c8c00b..509d84cdca 100644 --- a/app/workers/messaging.php +++ b/app/workers/messaging.php @@ -1,7 +1,7 @@ getResource('console'); /** CSV stuff */ diff --git a/src/Appwrite/Platform/Tasks/CalcUsersStats.php b/src/Appwrite/Platform/Tasks/CalcUsersStats.php index 6310fe17b4..f2b90e73e3 100644 --- a/src/Appwrite/Platform/Tasks/CalcUsersStats.php +++ b/src/Appwrite/Platform/Tasks/CalcUsersStats.php @@ -3,7 +3,7 @@ namespace Appwrite\Platform\Tasks; use Exception; -use Utopia\App; +use Utopia\Http\Http; use Utopia\Platform\Action; use Utopia\Cache\Cache; use Utopia\CLI\Console; @@ -55,7 +55,7 @@ class CalcUsersStats extends Action Console::success(APP_NAME . ' cloud Users calculation has started'); /* Initialise new Utopia app */ - $app = new App('UTC'); + $app = new Http('UTC'); $console = $app->getResource('console'); /** CSV stuff */ diff --git a/src/Appwrite/Platform/Tasks/Doctor.php b/src/Appwrite/Platform/Tasks/Doctor.php index 9a6d6a2847..eac002dd7f 100644 --- a/src/Appwrite/Platform/Tasks/Doctor.php +++ b/src/Appwrite/Platform/Tasks/Doctor.php @@ -2,7 +2,7 @@ namespace Appwrite\Platform\Tasks; -use Utopia\App; +use Utopia\Http\Http; use Utopia\CLI\Console; use Appwrite\ClamAV\Network; use Utopia\Logger\Logger; diff --git a/src/Appwrite/Platform/Tasks/Hamster.php b/src/Appwrite/Platform/Tasks/Hamster.php index 5b04c338eb..4dfdd54718 100644 --- a/src/Appwrite/Platform/Tasks/Hamster.php +++ b/src/Appwrite/Platform/Tasks/Hamster.php @@ -4,7 +4,7 @@ namespace Appwrite\Platform\Tasks; use Appwrite\Network\Validator\Origin; use Exception; -use Utopia\App; +use Utopia\Http\Http; use Utopia\Platform\Action; use Utopia\Cache\Cache; use Utopia\CLI\Console; @@ -286,7 +286,7 @@ class Hamster extends Action $loopStart = microtime(true); /* Initialise new Utopia app */ - $app = new App('UTC'); + $app = new Http('UTC'); Console::info('Getting stats for all projects'); $this->getStatsPerProject($pools, $cache, $dbForConsole); diff --git a/src/Appwrite/Platform/Tasks/Maintenance.php b/src/Appwrite/Platform/Tasks/Maintenance.php index eb98b1bb3b..efd640f1ff 100644 --- a/src/Appwrite/Platform/Tasks/Maintenance.php +++ b/src/Appwrite/Platform/Tasks/Maintenance.php @@ -4,7 +4,7 @@ namespace Appwrite\Platform\Tasks; use Appwrite\Event\Certificate; use Appwrite\Event\Delete; -use Utopia\App; +use Utopia\Http\Http; use Utopia\CLI\Console; use Utopia\Database\Database; use Utopia\Database\Document; diff --git a/src/Appwrite/Platform/Tasks/Migrate.php b/src/Appwrite/Platform/Tasks/Migrate.php index 38e5c8aa46..55ed7ece31 100644 --- a/src/Appwrite/Platform/Tasks/Migrate.php +++ b/src/Appwrite/Platform/Tasks/Migrate.php @@ -5,7 +5,7 @@ namespace Appwrite\Platform\Tasks; use Utopia\Platform\Action; use Utopia\CLI\Console; use Appwrite\Migration\Migration; -use Utopia\App; +use Utopia\Http\Http; use Utopia\Cache\Cache; use Utopia\Database\Database; use Utopia\Database\Document; @@ -50,7 +50,7 @@ class Migrate extends Action return; } - $app = new App('UTC'); + $app = new Http('UTC'); Console::success('Starting Data Migration to version ' . $version); diff --git a/src/Appwrite/Platform/Tasks/PatchDeleteProjectCollections.php b/src/Appwrite/Platform/Tasks/PatchDeleteProjectCollections.php index a909e68595..a8f78a92ab 100644 --- a/src/Appwrite/Platform/Tasks/PatchDeleteProjectCollections.php +++ b/src/Appwrite/Platform/Tasks/PatchDeleteProjectCollections.php @@ -2,7 +2,7 @@ namespace Appwrite\Platform\Tasks; -use Utopia\App; +use Utopia\Http\Http; use Utopia\Platform\Action; use Utopia\Cache\Cache; use Utopia\CLI\Console; @@ -51,7 +51,7 @@ class PatchDeleteProjectCollections extends Action Console::success(APP_NAME . ' delete project collections has started'); /* Initialise new Utopia app */ - $app = new App('UTC'); + $app = new Http('UTC'); $console = $app->getResource('console'); /** Database connections */ diff --git a/src/Appwrite/Platform/Tasks/SSL.php b/src/Appwrite/Platform/Tasks/SSL.php index 43026b0753..4f99a121c9 100644 --- a/src/Appwrite/Platform/Tasks/SSL.php +++ b/src/Appwrite/Platform/Tasks/SSL.php @@ -4,7 +4,7 @@ namespace Appwrite\Platform\Tasks; use Utopia\Platform\Action; use Appwrite\Event\Certificate; -use Utopia\App; +use Utopia\Http\Http; use Utopia\CLI\Console; use Utopia\Database\Document; use Utopia\Validator\Hostname; diff --git a/src/Appwrite/Platform/Tasks/Schedule.php b/src/Appwrite/Platform/Tasks/Schedule.php index 6883ee30da..0e8c951a5c 100644 --- a/src/Appwrite/Platform/Tasks/Schedule.php +++ b/src/Appwrite/Platform/Tasks/Schedule.php @@ -4,7 +4,7 @@ namespace Appwrite\Platform\Tasks; use Cron\CronExpression; use Swoole\Timer; -use Utopia\App; +use Utopia\Http\Http; use Utopia\Platform\Action; use Utopia\CLI\Console; use Utopia\Database\DateTime; diff --git a/src/Appwrite/Platform/Tasks/Specs.php b/src/Appwrite/Platform/Tasks/Specs.php index 28d31f6d7b..ca2c8855d4 100644 --- a/src/Appwrite/Platform/Tasks/Specs.php +++ b/src/Appwrite/Platform/Tasks/Specs.php @@ -10,7 +10,7 @@ use Appwrite\Specification\Specification; use Appwrite\Utopia\Response; use Exception; use Swoole\Http\Response as HttpResponse; -use Utopia\App; +use Utopia\Http\Http; use Utopia\Cache\Adapter\None; use Utopia\Cache\Cache; use Utopia\CLI\Console; @@ -224,7 +224,7 @@ class Specs extends Action } } - $arguments = [new App('UTC'), $services, $routes, $models, $keys[$platform], $authCounts[$platform] ?? 0]; + $arguments = [new Http('UTC'), $services, $routes, $models, $keys[$platform], $authCounts[$platform] ?? 0]; foreach (['swagger2', 'open-api3'] as $format) { $formatInstance = match ($format) { 'swagger2' => new Swagger2(...$arguments), diff --git a/src/Appwrite/Platform/Tasks/Usage.php b/src/Appwrite/Platform/Tasks/Usage.php index fa677ea142..5041db81ed 100644 --- a/src/Appwrite/Platform/Tasks/Usage.php +++ b/src/Appwrite/Platform/Tasks/Usage.php @@ -4,7 +4,7 @@ namespace Appwrite\Platform\Tasks; use Appwrite\Usage\Calculators\TimeSeries; use InfluxDB\Database as InfluxDatabase; -use Utopia\App; +use Utopia\Http\Http; use Utopia\CLI\Console; use Utopia\Database\Database as UtopiaDatabase; use Throwable; diff --git a/src/Appwrite/Platform/Tasks/Vars.php b/src/Appwrite/Platform/Tasks/Vars.php index c97f77a9da..ab4265c5da 100644 --- a/src/Appwrite/Platform/Tasks/Vars.php +++ b/src/Appwrite/Platform/Tasks/Vars.php @@ -2,7 +2,7 @@ namespace Appwrite\Platform\Tasks; -use Utopia\App; +use Utopia\Http\Http; use Utopia\Config\Config; use Utopia\CLI\Console; use Utopia\Platform\Action; diff --git a/src/Appwrite/Platform/Tasks/Version.php b/src/Appwrite/Platform/Tasks/Version.php index 4a9cbf9dcf..bea34c13cd 100644 --- a/src/Appwrite/Platform/Tasks/Version.php +++ b/src/Appwrite/Platform/Tasks/Version.php @@ -2,7 +2,7 @@ namespace Appwrite\Platform\Tasks; -use Utopia\App; +use Utopia\Http\Http; use Utopia\CLI\Console; use Utopia\Platform\Action; diff --git a/src/Appwrite/Resque/Worker.php b/src/Appwrite/Resque/Worker.php index 7693f1e6ff..01d7d4e2f1 100644 --- a/src/Appwrite/Resque/Worker.php +++ b/src/Appwrite/Resque/Worker.php @@ -4,7 +4,7 @@ namespace Appwrite\Resque; use Appwrite\Event\Usage; use Exception; -use Utopia\App; +use Utopia\Http\Http; use Utopia\Cache\Cache; use Utopia\Config\Config; use Utopia\Cache\Adapter\Sharding; diff --git a/src/Appwrite/Specification/Format.php b/src/Appwrite/Specification/Format.php index c2317c1153..79de22ec4b 100644 --- a/src/Appwrite/Specification/Format.php +++ b/src/Appwrite/Specification/Format.php @@ -2,7 +2,7 @@ namespace Appwrite\Specification; -use Utopia\App; +use Utopia\Http\Http; use Utopia\Config\Config; use Utopia\Route; use Appwrite\Utopia\Response\Model; diff --git a/src/Appwrite/Usage/Calculators/TimeSeries.php b/src/Appwrite/Usage/Calculators/TimeSeries.php index e0a12b443f..568114f266 100644 --- a/src/Appwrite/Usage/Calculators/TimeSeries.php +++ b/src/Appwrite/Usage/Calculators/TimeSeries.php @@ -2,7 +2,7 @@ namespace Appwrite\Usage\Calculators; -use Utopia\App; +use Utopia\Http\Http; use Appwrite\Usage\Calculator; use Utopia\Database\Database; use Utopia\Database\Document; diff --git a/src/Appwrite/Usage/Stats.php b/src/Appwrite/Usage/Stats.php index e6e0056664..caac8f7bb9 100644 --- a/src/Appwrite/Usage/Stats.php +++ b/src/Appwrite/Usage/Stats.php @@ -2,7 +2,7 @@ namespace Appwrite\Usage; -use Utopia\App; +use Utopia\Http\Http; class Stats { diff --git a/src/Appwrite/Vcs/Comment.php b/src/Appwrite/Vcs/Comment.php index 1107e0ee70..92fd6d0440 100644 --- a/src/Appwrite/Vcs/Comment.php +++ b/src/Appwrite/Vcs/Comment.php @@ -3,7 +3,7 @@ namespace Appwrite\Vcs; use Utopia\Database\Document; -use Utopia\App; +use Utopia\Http\Http; class Comment { diff --git a/src/Executor/Executor.php b/src/Executor/Executor.php index 36f6ad0dc5..e461497f7d 100644 --- a/src/Executor/Executor.php +++ b/src/Executor/Executor.php @@ -3,7 +3,7 @@ namespace Executor; use Exception; -use Utopia\App; +use Utopia\Http\Http; class Executor { diff --git a/tests/e2e/General/AbuseTest.php b/tests/e2e/General/AbuseTest.php index f5a2829974..415be0c665 100644 --- a/tests/e2e/General/AbuseTest.php +++ b/tests/e2e/General/AbuseTest.php @@ -7,7 +7,7 @@ use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\SideNone; -use Utopia\App; +use Utopia\Http\Http; use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; diff --git a/tests/e2e/Services/GraphQL/AbuseTest.php b/tests/e2e/Services/GraphQL/AbuseTest.php index 48ee64d141..5fa46ab5d8 100644 --- a/tests/e2e/Services/GraphQL/AbuseTest.php +++ b/tests/e2e/Services/GraphQL/AbuseTest.php @@ -6,7 +6,7 @@ use Tests\E2E\Client; use Tests\E2E\Scopes\ProjectCustom; use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\SideServer; -use Utopia\App; +use Utopia\Http\Http; use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; diff --git a/tests/unit/Event/EventTest.php b/tests/unit/Event/EventTest.php index a328c8d599..61d2a16371 100644 --- a/tests/unit/Event/EventTest.php +++ b/tests/unit/Event/EventTest.php @@ -5,7 +5,7 @@ namespace Tests\Unit\Event; use Appwrite\Event\Event; use InvalidArgumentException; use PHPUnit\Framework\TestCase; -use Utopia\App; +use Utopia\Http\Http; class EventTest extends TestCase { diff --git a/tests/unit/Usage/StatsTest.php b/tests/unit/Usage/StatsTest.php index f021841396..d5d12bc9e4 100644 --- a/tests/unit/Usage/StatsTest.php +++ b/tests/unit/Usage/StatsTest.php @@ -4,7 +4,7 @@ namespace Tests\Unit\Usage; use Appwrite\Usage\Stats; use PHPUnit\Framework\TestCase; -use Utopia\App; +use Utopia\Http\Http; class StatsTest extends TestCase {