mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Format
This commit is contained in:
@@ -180,13 +180,13 @@ $register->set('pools', function () {
|
||||
'type' => 'database',
|
||||
'dsns' => $fallbackForDB,
|
||||
'multiple' => true,
|
||||
'schemes' => ['mariadb', 'mongodb', 'mysql', 'postgresql'],
|
||||
'schemes' => ['mariadb', 'mongodb', 'mysql', 'postgresql'],
|
||||
],
|
||||
'logs' => [
|
||||
'type' => 'database',
|
||||
'dsns' => System::getEnv('_APP_CONNECTIONS_DB_LOGS', $fallbackForDB),
|
||||
'multiple' => false,
|
||||
'schemes' => ['mariadb', 'mongodb', 'mysql', 'postgresql'],
|
||||
'schemes' => ['mariadb', 'mongodb', 'mysql', 'postgresql'],
|
||||
],
|
||||
'publisher' => [
|
||||
'type' => 'publisher',
|
||||
@@ -386,20 +386,22 @@ $register->set('db', function () {
|
||||
switch ($dbAdapter) {
|
||||
case 'mongodb':
|
||||
try {
|
||||
$mongo = new MongoClient($dbScheme, $dbHost, (int)$dbPort, $dbUser, $dbPass, false);
|
||||
$mongo = new MongoClient($dbSchema, $dbHost, (int)$dbPort, $dbUser, $dbPass, false);
|
||||
@$mongo->connect();
|
||||
|
||||
return $mongo;
|
||||
} catch (\Throwable $e) {
|
||||
throw new Exception(Exception::GENERAL_SERVER_ERROR, "MongoDB connection failed: " . $e->getMessage());
|
||||
throw new Exception(Exception::GENERAL_SERVER_ERROR, 'MongoDB connection failed: ' . $e->getMessage());
|
||||
}
|
||||
case 'mysql':
|
||||
case 'mariadb':
|
||||
$dsn = "mysql:host={$dbHost};port={$dbPort};dbname={$dbScheme};charset=utf8mb4";
|
||||
$dsn = "mysql:host={$dbHost};port={$dbPort};dbname={$dbSchema};charset=utf8mb4";
|
||||
return new PDO($dsn, $dbUser, $dbPass, SQL::getPDOAttributes());
|
||||
case 'postgresql':
|
||||
$dsn = "pgsql:host={$dbHost};port={$dbPort};dbname={$dbSchema}";
|
||||
return new PDO($dsn, $dbUser, $dbPass, SQL::getPDOAttributes());
|
||||
return new PDO($dsn, $dbUser, $dbPass, SQL::getPDOAttributes());
|
||||
default:
|
||||
throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Invalid database adapter');
|
||||
}
|
||||
});
|
||||
|
||||
$register->set('smtp', function () {
|
||||
|
||||
Generated
+47
-42
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "8343d57d49bb1aeae8d3ce9980d6d735",
|
||||
"content-hash": "614cee499a4c67fe64f18006e0041168",
|
||||
"packages": [
|
||||
{
|
||||
"name": "adhocore/jwt",
|
||||
@@ -498,16 +498,16 @@
|
||||
},
|
||||
{
|
||||
"name": "dragonmantank/cron-expression",
|
||||
"version": "v3.3.3",
|
||||
"version": "v3.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/dragonmantank/cron-expression.git",
|
||||
"reference": "adfb1f505deb6384dc8b39804c5065dd3c8c8c0a"
|
||||
"reference": "8c784d071debd117328803d86b2097615b457500"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/adfb1f505deb6384dc8b39804c5065dd3c8c8c0a",
|
||||
"reference": "adfb1f505deb6384dc8b39804c5065dd3c8c8c0a",
|
||||
"url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/8c784d071debd117328803d86b2097615b457500",
|
||||
"reference": "8c784d071debd117328803d86b2097615b457500",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -520,10 +520,14 @@
|
||||
"require-dev": {
|
||||
"phpstan/extension-installer": "^1.0",
|
||||
"phpstan/phpstan": "^1.0",
|
||||
"phpstan/phpstan-webmozart-assert": "^1.0",
|
||||
"phpunit/phpunit": "^7.0|^8.0|^9.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Cron\\": "src/Cron/"
|
||||
@@ -547,7 +551,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/dragonmantank/cron-expression/issues",
|
||||
"source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.3"
|
||||
"source": "https://github.com/dragonmantank/cron-expression/tree/v3.4.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -555,7 +559,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2023-08-10T19:36:49+00:00"
|
||||
"time": "2024-10-09T13:47:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "enshrined/svg-sanitize",
|
||||
@@ -877,16 +881,16 @@
|
||||
},
|
||||
{
|
||||
"name": "matomo/device-detector",
|
||||
"version": "6.1.6",
|
||||
"version": "6.4.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/matomo-org/device-detector.git",
|
||||
"reference": "5cbea85106e561c7138d03603eb6e05128480409"
|
||||
"reference": "56baf981af4f192e15a4f369d4975af847a81ccb"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/matomo-org/device-detector/zipball/5cbea85106e561c7138d03603eb6e05128480409",
|
||||
"reference": "5cbea85106e561c7138d03603eb6e05128480409",
|
||||
"url": "https://api.github.com/repos/matomo-org/device-detector/zipball/56baf981af4f192e15a4f369d4975af847a81ccb",
|
||||
"reference": "56baf981af4f192e15a4f369d4975af847a81ccb",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -898,11 +902,12 @@
|
||||
},
|
||||
"require-dev": {
|
||||
"matthiasmullie/scrapbook": "^1.4.7",
|
||||
"mayflower/mo4-coding-standard": "^v8.0.0",
|
||||
"phpstan/phpstan": "^0.12.52",
|
||||
"mayflower/mo4-coding-standard": "^v9.0.0",
|
||||
"phpstan/phpstan": "^1.10.44",
|
||||
"phpunit/phpunit": "^8.5.8",
|
||||
"psr/cache": "^1.0.1",
|
||||
"psr/simple-cache": "^1.0.1",
|
||||
"slevomat/coding-standard": "<8.16.0",
|
||||
"symfony/yaml": "^5.1.7"
|
||||
},
|
||||
"suggest": {
|
||||
@@ -942,7 +947,7 @@
|
||||
"source": "https://github.com/matomo-org/matomo",
|
||||
"wiki": "https://dev.matomo.org/"
|
||||
},
|
||||
"time": "2023-10-02T10:01:54+00:00"
|
||||
"time": "2025-11-26T16:02:47+00:00"
|
||||
},
|
||||
{
|
||||
"name": "mongodb/mongodb",
|
||||
@@ -3792,16 +3797,16 @@
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/database",
|
||||
"version": "3.6.0",
|
||||
"version": "5.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/database.git",
|
||||
"reference": "af15066255a5fd7bd2926de37bcbf3d8500fc155"
|
||||
"reference": "83bd5bfdf28e32e36dcf20995173d72461685dc0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/database/zipball/af15066255a5fd7bd2926de37bcbf3d8500fc155",
|
||||
"reference": "af15066255a5fd7bd2926de37bcbf3d8500fc155",
|
||||
"url": "https://api.github.com/repos/utopia-php/database/zipball/83bd5bfdf28e32e36dcf20995173d72461685dc0",
|
||||
"reference": "83bd5bfdf28e32e36dcf20995173d72461685dc0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3809,10 +3814,10 @@
|
||||
"ext-mongodb": "*",
|
||||
"ext-pdo": "*",
|
||||
"php": ">=8.4",
|
||||
"utopia-php/cache": "1.0.*",
|
||||
"utopia-php/cache": "1.*",
|
||||
"utopia-php/framework": "0.33.*",
|
||||
"utopia-php/mongo": "0.11.*",
|
||||
"utopia-php/pools": "1.0.*"
|
||||
"utopia-php/mongo": "1.*",
|
||||
"utopia-php/pools": "1.*"
|
||||
},
|
||||
"require-dev": {
|
||||
"fakerphp/faker": "1.23.*",
|
||||
@@ -3844,9 +3849,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/database/issues",
|
||||
"source": "https://github.com/utopia-php/database/tree/3.6.0"
|
||||
"source": "https://github.com/utopia-php/database/tree/5.1.0"
|
||||
},
|
||||
"time": "2025-12-08T05:23:04+00:00"
|
||||
"time": "2026-02-12T07:29:20+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/detector",
|
||||
@@ -4514,16 +4519,16 @@
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/mongo",
|
||||
"version": "0.11.0",
|
||||
"version": "1.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/mongo.git",
|
||||
"reference": "34bc0cda8ea368cde68702a6fffe2c3ac625398e"
|
||||
"reference": "45bedf36c2c946ec7a0a3e59b9f12f772de0b01d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/mongo/zipball/34bc0cda8ea368cde68702a6fffe2c3ac625398e",
|
||||
"reference": "34bc0cda8ea368cde68702a6fffe2c3ac625398e",
|
||||
"url": "https://api.github.com/repos/utopia-php/mongo/zipball/45bedf36c2c946ec7a0a3e59b9f12f772de0b01d",
|
||||
"reference": "45bedf36c2c946ec7a0a3e59b9f12f772de0b01d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -4569,9 +4574,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/mongo/issues",
|
||||
"source": "https://github.com/utopia-php/mongo/tree/0.11.0"
|
||||
"source": "https://github.com/utopia-php/mongo/tree/1.0.0"
|
||||
},
|
||||
"time": "2025-10-20T11:11:23+00:00"
|
||||
"time": "2026-02-12T05:54:06+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/platform",
|
||||
@@ -4732,16 +4737,16 @@
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/queue",
|
||||
"version": "0.11.0",
|
||||
"version": "0.15.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/queue.git",
|
||||
"reference": "06b5ced0eaed2ecc6aab6d8e1b4d96bff37a1ce5"
|
||||
"reference": "aa80ffe6350efd3394615c3763dba138223a225a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/queue/zipball/06b5ced0eaed2ecc6aab6d8e1b4d96bff37a1ce5",
|
||||
"reference": "06b5ced0eaed2ecc6aab6d8e1b4d96bff37a1ce5",
|
||||
"url": "https://api.github.com/repos/utopia-php/queue/zipball/aa80ffe6350efd3394615c3763dba138223a225a",
|
||||
"reference": "aa80ffe6350efd3394615c3763dba138223a225a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -4792,9 +4797,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/queue/issues",
|
||||
"source": "https://github.com/utopia-php/queue/tree/0.11.0"
|
||||
"source": "https://github.com/utopia-php/queue/tree/0.15.5"
|
||||
},
|
||||
"time": "2025-05-30T09:52:38+00:00"
|
||||
"time": "2026-02-10T12:30:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/registry",
|
||||
@@ -5384,16 +5389,16 @@
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "appwrite/sdk-generator",
|
||||
"version": "1.8.28",
|
||||
"version": "1.8.29",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/appwrite/sdk-generator.git",
|
||||
"reference": "4762aa017b28a3a7e4e53da6e193d0c196ec3fd4"
|
||||
"reference": "eae24f143aa0e352acc8ae8975a0692fd77d2ec3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/4762aa017b28a3a7e4e53da6e193d0c196ec3fd4",
|
||||
"reference": "4762aa017b28a3a7e4e53da6e193d0c196ec3fd4",
|
||||
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/eae24f143aa0e352acc8ae8975a0692fd77d2ec3",
|
||||
"reference": "eae24f143aa0e352acc8ae8975a0692fd77d2ec3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -5429,9 +5434,9 @@
|
||||
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
|
||||
"support": {
|
||||
"issues": "https://github.com/appwrite/sdk-generator/issues",
|
||||
"source": "https://github.com/appwrite/sdk-generator/tree/1.8.28"
|
||||
"source": "https://github.com/appwrite/sdk-generator/tree/1.8.29"
|
||||
},
|
||||
"time": "2026-02-11T10:35:18+00:00"
|
||||
"time": "2026-02-12T07:22:23+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/annotations",
|
||||
|
||||
@@ -9,8 +9,8 @@ use Appwrite\SDK\Method;
|
||||
use Appwrite\SDK\Response as SDKResponse;
|
||||
use Appwrite\Utopia\Database\Validator\CustomId;
|
||||
use Appwrite\Utopia\Response as UtopiaResponse;
|
||||
use Utopia\Http\Adapter\Swoole\Response as SwooleResponse;
|
||||
use Utopia\Database\Database;
|
||||
use Utopia\Http\Adapter\Swoole\Response as SwooleResponse;
|
||||
use Utopia\Validator\Boolean;
|
||||
use Utopia\Validator\Text;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user