Skip to content

Commit 942cfc4

Browse files
committed
Merge branch '1.8.x' into feat-integer-format-int64
2 parents ae6df78 + 321fc8e commit 942cfc4

210 files changed

Lines changed: 1062 additions & 1512 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

app/cli.php

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
// require controllers after overwriting runtimes
4242
require_once __DIR__ . '/controllers/general.php';
4343

44+
Authorization::disable();
45+
4446
CLI::setResource('register', fn () => $register);
4547

4648
CLI::setResource('cache', function ($pools) {
@@ -58,13 +60,7 @@
5860
return $register->get('pools');
5961
}, ['register']);
6062

61-
CLI::setResource('authorization', function () {
62-
$authorization = new Authorization();
63-
$authorization->disable();
64-
return $authorization;
65-
}, []);
66-
67-
CLI::setResource('dbForPlatform', function ($pools, $cache, $authorization) {
63+
CLI::setResource('dbForPlatform', function ($pools, $cache) {
6864
$sleep = 3;
6965
$maxAttempts = 5;
7066
$attempts = 0;
@@ -78,7 +74,6 @@
7874
$dbForPlatform = new Database($adapter, $cache);
7975

8076
$dbForPlatform
81-
->setAuthorization($authorization)
8277
->setNamespace('_console')
8378
->setMetadata('host', \gethostname())
8479
->setMetadata('project', 'console');
@@ -104,7 +99,7 @@
10499
}
105100

106101
return $dbForPlatform;
107-
}, ['pools', 'cache', 'authorization']);
102+
}, ['pools', 'cache']);
108103

109104
CLI::setResource('console', function () {
110105
return new Document(Config::getParam('console'));
@@ -115,10 +110,10 @@
115110
fn () => fn (Document $project, string $resourceType, ?string $resourceId) => false
116111
);
117112

118-
CLI::setResource('getProjectDB', function (Group $pools, Database $dbForPlatform, $cache, $authorization) {
113+
CLI::setResource('getProjectDB', function (Group $pools, Database $dbForPlatform, $cache) {
119114
$databases = []; // TODO: @Meldiron This should probably be responsibility of utopia-php/pools
120115

121-
return function (Document $project) use ($pools, $dbForPlatform, $cache, $authorization, &$databases) {
116+
return function (Document $project) use ($pools, $dbForPlatform, $cache, &$databases) {
122117
if ($project->isEmpty() || $project->getId() === 'console') {
123118
return $dbForPlatform;
124119
}
@@ -151,7 +146,6 @@
151146

152147
$adapter = new DatabasePool($pools->get($dsn->getHost()));
153148
$database = new Database($adapter, $cache);
154-
155149
$databases[$dsn->getHost()] = $database;
156150
$sharedTables = \explode(',', System::getEnv('_APP_DATABASE_SHARED_TABLES', ''));
157151

@@ -168,18 +162,17 @@
168162
}
169163

170164
$database
171-
->setAuthorization($authorization)
172165
->setMetadata('host', \gethostname())
173166
->setMetadata('project', $project->getId());
174167

175168
return $database;
176169
};
177-
}, ['pools', 'dbForPlatform', 'cache', 'authorization']);
170+
}, ['pools', 'dbForPlatform', 'cache']);
178171

179-
CLI::setResource('getLogsDB', function (Group $pools, Cache $cache, Authorization $authorization) {
172+
CLI::setResource('getLogsDB', function (Group $pools, Cache $cache) {
180173
$database = null;
181174

182-
return function (?Document $project = null) use ($pools, $cache, $database, $authorization) {
175+
return function (?Document $project = null) use ($pools, $cache, $database) {
183176
if ($database !== null && $project !== null && !$project->isEmpty() && $project->getId() !== 'console') {
184177
$database->setTenant((int)$project->getSequence());
185178
return $database;
@@ -189,7 +182,6 @@
189182
$database = new Database($adapter, $cache);
190183

191184
$database
192-
->setAuthorization($authorization)
193185
->setSharedTables(true)
194186
->setNamespace('logsV1')
195187
->setTimeout(APP_DATABASE_TIMEOUT_MILLISECONDS_TASK)
@@ -202,7 +194,7 @@
202194

203195
return $database;
204196
};
205-
}, ['pools', 'cache', 'authorization']);
197+
}, ['pools', 'cache']);
206198
CLI::setResource('publisher', function (Group $pools) {
207199
return new BrokerPool(publisher: $pools->get('publisher'));
208200
}, ['pools']);

app/config/sdks.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
[
6161
'key' => 'flutter',
6262
'name' => 'Flutter',
63-
'version' => '20.3.2',
63+
'version' => '20.3.3',
6464
'url' => 'https://github.com/appwrite/sdk-for-flutter',
6565
'package' => 'https://pub.dev/packages/appwrite',
6666
'enabled' => true,
@@ -377,7 +377,7 @@
377377
[
378378
'key' => 'dart',
379379
'name' => 'Dart',
380-
'version' => '20.1.0',
380+
'version' => '20.1.1',
381381
'url' => 'https://github.com/appwrite/sdk-for-dart',
382382
'package' => 'https://pub.dev/packages/dart_appwrite',
383383
'enabled' => true,

app/config/specs/open-api3-latest-console.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61445,7 +61445,7 @@
6144561445
"status": {
6144661446
"type": "string",
6144761447
"description": "Status of delivery.",
61448-
"x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed.",
61448+
"x-example": "processing",
6144961449
"enum": [
6145061450
"draft",
6145161451
"processing",
@@ -61491,7 +61491,7 @@
6149161491
"subject": "Welcome to Appwrite",
6149261492
"content": "Hi there, welcome to Appwrite family."
6149361493
},
61494-
"status": "Message status can be one of the following: draft, processing, scheduled, sent, or failed."
61494+
"status": "processing"
6149561495
}
6149661496
},
6149761497
"topic": {

app/config/specs/open-api3-latest-server.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45416,7 +45416,7 @@
4541645416
"status": {
4541745417
"type": "string",
4541845418
"description": "Status of delivery.",
45419-
"x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed.",
45419+
"x-example": "processing",
4542045420
"enum": [
4542145421
"draft",
4542245422
"processing",
@@ -45462,7 +45462,7 @@
4546245462
"subject": "Welcome to Appwrite",
4546345463
"content": "Hi there, welcome to Appwrite family."
4546445464
},
45465-
"status": "Message status can be one of the following: draft, processing, scheduled, sent, or failed."
45465+
"status": "processing"
4546645466
}
4546745467
},
4546845468
"topic": {

app/config/specs/swagger2-latest-console.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61384,7 +61384,7 @@
6138461384
"status": {
6138561385
"type": "string",
6138661386
"description": "Status of delivery.",
61387-
"x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed.",
61387+
"x-example": "processing",
6138861388
"enum": [
6138961389
"draft",
6139061390
"processing",
@@ -61430,7 +61430,7 @@
6143061430
"subject": "Welcome to Appwrite",
6143161431
"content": "Hi there, welcome to Appwrite family."
6143261432
},
61433-
"status": "Message status can be one of the following: draft, processing, scheduled, sent, or failed."
61433+
"status": "processing"
6143461434
}
6143561435
},
6143661436
"topic": {

app/config/specs/swagger2-latest-server.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45349,7 +45349,7 @@
4534945349
"status": {
4535045350
"type": "string",
4535145351
"description": "Status of delivery.",
45352-
"x-example": "Message status can be one of the following: draft, processing, scheduled, sent, or failed.",
45352+
"x-example": "processing",
4535345353
"enum": [
4535445354
"draft",
4535545355
"processing",
@@ -45395,7 +45395,7 @@
4539545395
"subject": "Welcome to Appwrite",
4539645396
"content": "Hi there, welcome to Appwrite family."
4539745397
},
45398-
"status": "Message status can be one of the following: draft, processing, scheduled, sent, or failed."
45398+
"status": "processing"
4539945399
}
4540045400
},
4540145401
"topic": {

app/config/storage/resource_limits.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,4 @@
33
use Utopia\Image\Image;
44
use Utopia\System\System;
55

6-
if (\class_exists('Imagick')) {
7-
Image::setResourceLimit('memory', intval(System::getEnv('_APP_IMAGES_RESOURCE_LIMIT_MEMORY', 1024*1024*64)));
8-
}
6+
Image::setResourceLimit('memory', intval(System::getEnv('_APP_IMAGES_RESOURCE_LIMIT_MEMORY', 1024*1024*64)));

0 commit comments

Comments
 (0)