diff --git a/app/views/console/users/index.phtml b/app/views/console/users/index.phtml
index 840958b9a..487408328 100644
--- a/app/views/console/users/index.phtml
+++ b/app/views/console/users/index.phtml
@@ -308,9 +308,9 @@ $providers = $this->getParam('providers', []);
$data):
if (isset($data['enabled']) && !$data['enabled']) { continue; }
if (isset($data['mock']) && $data['mock']) { continue; }
- $form = (isset($data['form'])) ? $data['form'] : false;
- $name = (isset($data['name'])) ? $data['name'] : 'Unknown';
- $beta = (isset($data['beta'])) ? $data['beta'] : false;
+ $form = $data['form'] ?? false;
+ $name = $data['name'] ?? 'Unknown';
+ $beta = $data['beta'] ?? false;
?>
diff --git a/app/views/install/compose.phtml b/app/views/install/compose.phtml
index 49d599a7d..089bb438f 100644
--- a/app/views/install/compose.phtml
+++ b/app/views/install/compose.phtml
@@ -270,9 +270,9 @@ services:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=rootsecretpassword
- - MYSQL_DATABASE=appwrite
- - MYSQL_USER=user
- - MYSQL_PASSWORD=password
+ - MYSQL_DATABASE=${_APP_DB_SCHEMA}
+ - MYSQL_USER=${_APP_DB_USER}
+ - MYSQL_PASSWORD=${_APP_DB_PASS}
command: 'mysqld --innodb-flush-method=fsync'
smtp:
@@ -295,7 +295,7 @@ services:
- appwrite-redis:/data:rw
clamav:
- image: appwrite/clamav:1.0.12
+ image: appwrite/clamav:1.2.0
container_name: appwrite-clamav
restart: unless-stopped
networks:
diff --git a/app/workers/certificates.php b/app/workers/certificates.php
index 515fbb7b0..73d61107e 100644
--- a/app/workers/certificates.php
+++ b/app/workers/certificates.php
@@ -52,8 +52,8 @@ class CertificatesV1
$domain = $this->args['domain'];
// Validation Args
- $validateTarget = (isset($this->args['validateTarget'])) ? $this->args['validateTarget'] : true;
- $validateCNAME = (isset($this->args['validateCNAME'])) ? $this->args['validateCNAME'] : true;
+ $validateTarget = $this->args['validateTarget'] ?? true;
+ $validateCNAME = $this->args['validateCNAME'] ?? true;
// Options
$domain = new Domain((!empty($domain)) ? $domain : '');
@@ -66,7 +66,7 @@ class CertificatesV1
}
if(!$domain->isKnown() || $domain->isTest()) {
- throw new Exception('Unkown public suffix for domain');
+ throw new Exception('Unknown public suffix for domain');
}
if($validateTarget) {
diff --git a/app/workers/tasks.php b/app/workers/tasks.php
index ca82abe59..f654748a6 100644
--- a/app/workers/tasks.php
+++ b/app/workers/tasks.php
@@ -48,9 +48,9 @@ class TasksV1
* If error count bigger than allowed change status to pause
*/
- $taskId = (isset($this->args['$id'])) ? $this->args['$id'] : null;
- $updated = (isset($this->args['updated'])) ? $this->args['updated'] : null;
- $next = (isset($this->args['next'])) ? $this->args['next'] : null;
+ $taskId = $this->args['$id'] ?? null;
+ $updated = $this->args['updated'] ?? null;
+ $next = $this->args['next'] ?? null;
$delay = \time() - $next;
$errors = [];
$timeout = 60 * 5; // 5 minutes
diff --git a/app/workers/webhooks.php b/app/workers/webhooks.php
index 25691a108..cfbc8a671 100644
--- a/app/workers/webhooks.php
+++ b/app/workers/webhooks.php
@@ -55,12 +55,12 @@ class WebhooksV1
continue;
}
- $name = (isset($webhook['name'])) ? $webhook['name'] : '';
- $signature = (isset($webhook['signature'])) ? $webhook['signature'] : 'not-yet-implemented';
- $url = (isset($webhook['url'])) ? $webhook['url'] : '';
- $security = (isset($webhook['security'])) ? (bool) $webhook['security'] : true;
- $httpUser = (isset($webhook['httpUser'])) ? $webhook['httpUser'] : null;
- $httpPass = (isset($webhook['httpPass'])) ? $webhook['httpPass'] : null;
+ $name = $webhook['name'] ?? '';
+ $signature = $webhook['signature'] ?? 'not-yet-implemented';
+ $url = $webhook['url'] ?? '';
+ $security = (bool) $webhook['security'] ?? true;
+ $httpUser = $webhook['httpUser'] ?? null;
+ $httpPass = $webhook['httpPass'] ?? null;
$ch = \curl_init($url);
diff --git a/bin/vars b/bin/vars
new file mode 100644
index 000000000..19e3f1ebf
--- /dev/null
+++ b/bin/vars
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+php /usr/src/code/app/cli.php vars $@
\ No newline at end of file
diff --git a/composer.json b/composer.json
index cff7b542b..797ceb87f 100644
--- a/composer.json
+++ b/composer.json
@@ -26,6 +26,7 @@
"ext-yaml": "*",
"ext-dom": "*",
"ext-redis": "*",
+ "ext-swoole": "*",
"ext-pdo": "*",
"ext-openssl": "*",
"ext-zlib": "*",
@@ -41,10 +42,10 @@
"utopia-php/config": "0.2.*",
"utopia-php/locale": "0.3.*",
"utopia-php/registry": "0.2.*",
+ "utopia-php/preloader": "0.2.*",
"utopia-php/domains": "1.1.*",
"resque/php-resque": "1.3.6",
- "geoip2/geoip2": "2.10.0",
"piwik/device-detector": "3.13.0",
"dragonmantank/cron-expression": "3.0.1",
"domnikl/statsd": "3.0.*",
diff --git a/composer.lock b/composer.lock
index 810eb51ef..b4be605cc 100644
--- a/composer.lock
+++ b/composer.lock
@@ -221,16 +221,16 @@
},
{
"name": "colinmollenhour/credis",
- "version": "1.11.2",
+ "version": "v1.11.4",
"source": {
"type": "git",
"url": "https://github.com/colinmollenhour/credis.git",
- "reference": "b8b2bd6b87d2d4df67065f3510efb80d5f9c4e53"
+ "reference": "b458b7c65d156744f5f0c4667c0f8ce45d955435"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/colinmollenhour/credis/zipball/b8b2bd6b87d2d4df67065f3510efb80d5f9c4e53",
- "reference": "b8b2bd6b87d2d4df67065f3510efb80d5f9c4e53",
+ "url": "https://api.github.com/repos/colinmollenhour/credis/zipball/b458b7c65d156744f5f0c4667c0f8ce45d955435",
+ "reference": "b458b7c65d156744f5f0c4667c0f8ce45d955435",
"shasum": ""
},
"require": {
@@ -257,90 +257,20 @@
],
"description": "Credis is a lightweight interface to the Redis key-value store which wraps the phpredis library when available for better performance.",
"homepage": "https://github.com/colinmollenhour/credis",
- "time": "2020-06-15T19:25:47+00:00"
- },
- {
- "name": "composer/ca-bundle",
- "version": "dev-master",
- "source": {
- "type": "git",
- "url": "https://github.com/composer/ca-bundle.git",
- "reference": "8a7ecad675253e4654ea05505233285377405215"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/composer/ca-bundle/zipball/8a7ecad675253e4654ea05505233285377405215",
- "reference": "8a7ecad675253e4654ea05505233285377405215",
- "shasum": ""
- },
- "require": {
- "ext-openssl": "*",
- "ext-pcre": "*",
- "php": "^5.3.2 || ^7.0 || ^8.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8",
- "psr/log": "^1.0",
- "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Composer\\CaBundle\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Jordi Boggiano",
- "email": "j.boggiano@seld.be",
- "homepage": "http://seld.be"
- }
- ],
- "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.",
- "keywords": [
- "cabundle",
- "cacert",
- "certificate",
- "ssl",
- "tls"
- ],
- "funding": [
- {
- "url": "https://packagist.com",
- "type": "custom"
- },
- {
- "url": "https://github.com/composer",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/composer/composer",
- "type": "tidelift"
- }
- ],
- "time": "2020-08-23T12:54:47+00:00"
+ "time": "2020-10-13T23:55:13+00:00"
},
{
"name": "dasprid/enum",
- "version": "1.0.2",
+ "version": "1.0.3",
"source": {
"type": "git",
"url": "https://github.com/DASPRiD/Enum.git",
- "reference": "6ccc0d7141a7f149e3c56cb0ce5f05d9152cfd07"
+ "reference": "5abf82f213618696dda8e3bf6f64dd042d8542b2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/DASPRiD/Enum/zipball/6ccc0d7141a7f149e3c56cb0ce5f05d9152cfd07",
- "reference": "6ccc0d7141a7f149e3c56cb0ce5f05d9152cfd07",
+ "url": "https://api.github.com/repos/DASPRiD/Enum/zipball/5abf82f213618696dda8e3bf6f64dd042d8542b2",
+ "reference": "5abf82f213618696dda8e3bf6f64dd042d8542b2",
"shasum": ""
},
"require-dev": {
@@ -370,7 +300,7 @@
"enum",
"map"
],
- "time": "2020-07-30T16:37:13+00:00"
+ "time": "2020-10-02T16:03:48+00:00"
},
{
"name": "domnikl/statsd",
@@ -476,78 +406,25 @@
],
"time": "2020-08-21T02:30:13+00:00"
},
- {
- "name": "geoip2/geoip2",
- "version": "v2.10.0",
- "source": {
- "type": "git",
- "url": "https://github.com/maxmind/GeoIP2-php.git",
- "reference": "419557cd21d9fe039721a83490701a58c8ce784a"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/maxmind/GeoIP2-php/zipball/419557cd21d9fe039721a83490701a58c8ce784a",
- "reference": "419557cd21d9fe039721a83490701a58c8ce784a",
- "shasum": ""
- },
- "require": {
- "ext-json": "*",
- "maxmind-db/reader": "~1.5",
- "maxmind/web-service-common": "~0.6",
- "php": ">=5.6"
- },
- "require-dev": {
- "friendsofphp/php-cs-fixer": "2.*",
- "phpunit/phpunit": "5.*",
- "squizlabs/php_codesniffer": "3.*"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "GeoIp2\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "Apache-2.0"
- ],
- "authors": [
- {
- "name": "Gregory J. Oschwald",
- "email": "goschwald@maxmind.com",
- "homepage": "https://www.maxmind.com/"
- }
- ],
- "description": "MaxMind GeoIP2 PHP API",
- "homepage": "https://github.com/maxmind/GeoIP2-php",
- "keywords": [
- "IP",
- "geoip",
- "geoip2",
- "geolocation",
- "maxmind"
- ],
- "time": "2019-12-12T18:48:39+00:00"
- },
{
"name": "guzzlehttp/guzzle",
- "version": "dev-master",
+ "version": "7.2.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
- "reference": "616288af85deea154a61f5b996b0df69f7252e36"
+ "reference": "0aa74dfb41ae110835923ef10a9d803a22d50e79"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/guzzle/zipball/616288af85deea154a61f5b996b0df69f7252e36",
- "reference": "616288af85deea154a61f5b996b0df69f7252e36",
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/0aa74dfb41ae110835923ef10a9d803a22d50e79",
+ "reference": "0aa74dfb41ae110835923ef10a9d803a22d50e79",
"shasum": ""
},
"require": {
"ext-json": "*",
"guzzlehttp/promises": "^1.4",
"guzzlehttp/psr7": "^1.7",
- "php": "^7.2.5",
+ "php": "^7.2.5 || ^8.0",
"psr/http-client": "^1.0"
},
"provide": {
@@ -555,8 +432,8 @@
},
"require-dev": {
"ext-curl": "*",
- "php-http/client-integration-tests": "dev-phpunit8",
- "phpunit/phpunit": "^8.5.5",
+ "php-http/client-integration-tests": "^3.0",
+ "phpunit/phpunit": "^8.5.5 || ^9.3.5",
"psr/log": "^1.1"
},
"suggest": {
@@ -625,7 +502,7 @@
"type": "github"
}
],
- "time": "2020-09-30T15:03:52+00:00"
+ "time": "2020-10-10T11:47:56+00:00"
},
{
"name": "guzzlehttp/promises",
@@ -633,12 +510,12 @@
"source": {
"type": "git",
"url": "https://github.com/guzzle/promises.git",
- "reference": "60d379c243457e073cff02bc323a2a86cb355631"
+ "reference": "ddfeedfff2a52661429437da0702979f708e6ac6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/promises/zipball/60d379c243457e073cff02bc323a2a86cb355631",
- "reference": "60d379c243457e073cff02bc323a2a86cb355631",
+ "url": "https://api.github.com/repos/guzzle/promises/zipball/ddfeedfff2a52661429437da0702979f708e6ac6",
+ "reference": "ddfeedfff2a52661429437da0702979f708e6ac6",
"shasum": ""
},
"require": {
@@ -676,7 +553,7 @@
"keywords": [
"promise"
],
- "time": "2020-09-30T07:37:28+00:00"
+ "time": "2020-10-19T16:50:15+00:00"
},
{
"name": "guzzlehttp/psr7",
@@ -684,12 +561,12 @@
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
- "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3"
+ "reference": "25f7f893f0b52b7b14e244a16679d72b1f0088de"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/psr7/zipball/53330f47520498c0ae1f61f7e2c90f55690c06a3",
- "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3",
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/25f7f893f0b52b7b14e244a16679d72b1f0088de",
+ "reference": "25f7f893f0b52b7b14e244a16679d72b1f0088de",
"shasum": ""
},
"require": {
@@ -747,7 +624,7 @@
"uri",
"url"
],
- "time": "2020-09-30T07:37:11+00:00"
+ "time": "2020-10-22T07:42:05+00:00"
},
{
"name": "influxdb/influxdb-php",
@@ -810,112 +687,6 @@
],
"time": "2020-09-18T13:24:03+00:00"
},
- {
- "name": "maxmind-db/reader",
- "version": "v1.7.0",
- "source": {
- "type": "git",
- "url": "https://github.com/maxmind/MaxMind-DB-Reader-php.git",
- "reference": "942553da239f12051275f9c666538b5dd09e2908"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/maxmind/MaxMind-DB-Reader-php/zipball/942553da239f12051275f9c666538b5dd09e2908",
- "reference": "942553da239f12051275f9c666538b5dd09e2908",
- "shasum": ""
- },
- "require": {
- "php": ">=7.2"
- },
- "conflict": {
- "ext-maxminddb": "<1.7.0,>=2.0.0"
- },
- "require-dev": {
- "friendsofphp/php-cs-fixer": "2.*",
- "php-coveralls/php-coveralls": "^2.1",
- "phpunit/phpcov": ">=6.0.0",
- "phpunit/phpunit": ">=8.0.0,<10.0.0",
- "squizlabs/php_codesniffer": "3.*"
- },
- "suggest": {
- "ext-bcmath": "bcmath or gmp is required for decoding larger integers with the pure PHP decoder",
- "ext-gmp": "bcmath or gmp is required for decoding larger integers with the pure PHP decoder",
- "ext-maxminddb": "A C-based database decoder that provides significantly faster lookups"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "MaxMind\\Db\\": "src/MaxMind/Db"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "Apache-2.0"
- ],
- "authors": [
- {
- "name": "Gregory J. Oschwald",
- "email": "goschwald@maxmind.com",
- "homepage": "https://www.maxmind.com/"
- }
- ],
- "description": "MaxMind DB Reader API",
- "homepage": "https://github.com/maxmind/MaxMind-DB-Reader-php",
- "keywords": [
- "database",
- "geoip",
- "geoip2",
- "geolocation",
- "maxmind"
- ],
- "time": "2020-08-07T22:10:05+00:00"
- },
- {
- "name": "maxmind/web-service-common",
- "version": "v0.7.0",
- "source": {
- "type": "git",
- "url": "https://github.com/maxmind/web-service-common-php.git",
- "reference": "74c996c218ada5c639c8c2f076756e059f5552fc"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/maxmind/web-service-common-php/zipball/74c996c218ada5c639c8c2f076756e059f5552fc",
- "reference": "74c996c218ada5c639c8c2f076756e059f5552fc",
- "shasum": ""
- },
- "require": {
- "composer/ca-bundle": "^1.0.3",
- "ext-curl": "*",
- "ext-json": "*",
- "php": ">=5.6"
- },
- "require-dev": {
- "friendsofphp/php-cs-fixer": "2.*",
- "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0",
- "squizlabs/php_codesniffer": "3.*"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "MaxMind\\Exception\\": "src/Exception",
- "MaxMind\\WebService\\": "src/WebService"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "Apache-2.0"
- ],
- "authors": [
- {
- "name": "Gregory Oschwald",
- "email": "goschwald@maxmind.com"
- }
- ],
- "description": "Internal MaxMind Web Service API",
- "homepage": "https://github.com/maxmind/web-service-common-php",
- "time": "2020-05-06T14:07:26+00:00"
- },
{
"name": "mustangostang/spyc",
"version": "dev-master",
@@ -1356,16 +1127,16 @@
},
{
"name": "utopia-php/abuse",
- "version": "0.2.1",
+ "version": "0.2.2",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/abuse.git",
- "reference": "b485eddeda335c4f7d1a16fbf5544e37bdf195ac"
+ "reference": "8e65890a6d7afa9f57992f1eca9fe64508f9822e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/utopia-php/abuse/zipball/b485eddeda335c4f7d1a16fbf5544e37bdf195ac",
- "reference": "b485eddeda335c4f7d1a16fbf5544e37bdf195ac",
+ "url": "https://api.github.com/repos/utopia-php/abuse/zipball/8e65890a6d7afa9f57992f1eca9fe64508f9822e",
+ "reference": "8e65890a6d7afa9f57992f1eca9fe64508f9822e",
"shasum": ""
},
"require": {
@@ -1373,7 +1144,8 @@
"php": ">=7.1"
},
"require-dev": {
- "phpunit/phpunit": "^7.0"
+ "phpunit/phpunit": "^9.4",
+ "vimeo/psalm": "4.0.1"
},
"type": "library",
"autoload": {
@@ -1399,20 +1171,20 @@
"upf",
"utopia"
],
- "time": "2020-06-20T11:35:08+00:00"
+ "time": "2020-10-23T06:51:42+00:00"
},
{
"name": "utopia-php/audit",
- "version": "0.3.1",
+ "version": "0.3.2",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/audit.git",
- "reference": "7bcceba05ed640fe910e7b6b0c82d998fb9d6495"
+ "reference": "544ecff78788d11f60992a721f102cafc22ab084"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/utopia-php/audit/zipball/7bcceba05ed640fe910e7b6b0c82d998fb9d6495",
- "reference": "7bcceba05ed640fe910e7b6b0c82d998fb9d6495",
+ "url": "https://api.github.com/repos/utopia-php/audit/zipball/544ecff78788d11f60992a721f102cafc22ab084",
+ "reference": "544ecff78788d11f60992a721f102cafc22ab084",
"shasum": ""
},
"require": {
@@ -1420,7 +1192,8 @@
"php": ">=7.1"
},
"require-dev": {
- "phpunit/phpunit": "^7.0"
+ "phpunit/phpunit": "^9.3",
+ "vimeo/psalm": "4.0.1"
},
"type": "library",
"autoload": {
@@ -1446,28 +1219,29 @@
"upf",
"utopia"
],
- "time": "2020-06-20T11:36:43+00:00"
+ "time": "2020-10-23T08:09:44+00:00"
},
{
"name": "utopia-php/cache",
- "version": "0.2.1",
+ "version": "0.2.3",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/cache.git",
- "reference": "52a20ae1d5e3f5be11492c4bb0af9cf2a2c07e5d"
+ "reference": "a44b904127f88fa64673e402e5c0732ff6687d47"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/utopia-php/cache/zipball/52a20ae1d5e3f5be11492c4bb0af9cf2a2c07e5d",
- "reference": "52a20ae1d5e3f5be11492c4bb0af9cf2a2c07e5d",
+ "url": "https://api.github.com/repos/utopia-php/cache/zipball/a44b904127f88fa64673e402e5c0732ff6687d47",
+ "reference": "a44b904127f88fa64673e402e5c0732ff6687d47",
"shasum": ""
},
"require": {
"ext-json": "*",
- "php": ">=7.1"
+ "php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^7.0"
+ "phpunit/phpunit": "^9.3",
+ "vimeo/psalm": "4.0.1"
},
"type": "library",
"autoload": {
@@ -1493,7 +1267,7 @@
"upf",
"utopia"
],
- "time": "2020-06-20T11:43:40+00:00"
+ "time": "2020-10-24T10:11:01+00:00"
},
{
"name": "utopia-php/cli",
@@ -1545,23 +1319,24 @@
},
{
"name": "utopia-php/config",
- "version": "0.2.1",
+ "version": "0.2.2",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/config.git",
- "reference": "48c5009c33b8426260ee7425100e716d7ed7f693"
+ "reference": "a3d7bc0312d7150d5e04b1362dc34b2b136908cc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/utopia-php/config/zipball/48c5009c33b8426260ee7425100e716d7ed7f693",
- "reference": "48c5009c33b8426260ee7425100e716d7ed7f693",
+ "url": "https://api.github.com/repos/utopia-php/config/zipball/a3d7bc0312d7150d5e04b1362dc34b2b136908cc",
+ "reference": "a3d7bc0312d7150d5e04b1362dc34b2b136908cc",
"shasum": ""
},
"require": {
- "php": ">=7.1"
+ "php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^7.0"
+ "phpunit/phpunit": "^9.3",
+ "vimeo/psalm": "4.0.1"
},
"type": "library",
"autoload": {
@@ -1587,7 +1362,7 @@
"upf",
"utopia"
],
- "time": "2020-06-20T11:38:58+00:00"
+ "time": "2020-10-24T09:49:09+00:00"
},
{
"name": "utopia-php/domains",
@@ -1685,23 +1460,24 @@
},
{
"name": "utopia-php/locale",
- "version": "0.3.2",
+ "version": "0.3.3",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/locale.git",
- "reference": "89c488fbff65fc87c048786c3d76b6003fbaa833"
+ "reference": "5b5b22aab786d6e66eb3b9d546b7e606deae68e4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/utopia-php/locale/zipball/89c488fbff65fc87c048786c3d76b6003fbaa833",
- "reference": "89c488fbff65fc87c048786c3d76b6003fbaa833",
+ "url": "https://api.github.com/repos/utopia-php/locale/zipball/5b5b22aab786d6e66eb3b9d546b7e606deae68e4",
+ "reference": "5b5b22aab786d6e66eb3b9d546b7e606deae68e4",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"require-dev": {
- "phpunit/phpunit": "^7.0"
+ "phpunit/phpunit": "^9.3",
+ "vimeo/psalm": "4.0.1"
},
"type": "library",
"autoload": {
@@ -1727,27 +1503,77 @@
"upf",
"utopia"
],
- "time": "2020-06-29T20:53:16+00:00"
+ "time": "2020-10-24T08:12:55+00:00"
},
{
- "name": "utopia-php/registry",
- "version": "0.2.3",
+ "name": "utopia-php/preloader",
+ "version": "0.2.4",
"source": {
"type": "git",
- "url": "https://github.com/utopia-php/registry.git",
- "reference": "948aa82942a1bde8b97ec74fdc1a83fb24122788"
+ "url": "https://github.com/utopia-php/preloader.git",
+ "reference": "65ef48392e72172f584b0baa2e224f9a1cebcce0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/utopia-php/registry/zipball/948aa82942a1bde8b97ec74fdc1a83fb24122788",
- "reference": "948aa82942a1bde8b97ec74fdc1a83fb24122788",
+ "url": "https://api.github.com/repos/utopia-php/preloader/zipball/65ef48392e72172f584b0baa2e224f9a1cebcce0",
+ "reference": "65ef48392e72172f584b0baa2e224f9a1cebcce0",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"require-dev": {
- "phpunit/phpunit": "^7.0"
+ "phpunit/phpunit": "^9.3",
+ "vimeo/psalm": "4.0.1"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Utopia\\Preloader\\": "src/Preloader"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Eldad Fux",
+ "email": "team@appwrite.io"
+ }
+ ],
+ "description": "Utopia Preloader library is simple and lite library for managing PHP preloading configuration",
+ "keywords": [
+ "framework",
+ "php",
+ "preload",
+ "preloader",
+ "preloading",
+ "upf",
+ "utopia"
+ ],
+ "time": "2020-10-24T07:04:59+00:00"
+ },
+ {
+ "name": "utopia-php/registry",
+ "version": "0.2.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/utopia-php/registry.git",
+ "reference": "428a94f1a36147e7b7221e778c01e1be08db2893"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/utopia-php/registry/zipball/428a94f1a36147e7b7221e778c01e1be08db2893",
+ "reference": "428a94f1a36147e7b7221e778c01e1be08db2893",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3",
+ "vimeo/psalm": "4.0.1"
},
"type": "library",
"autoload": {
@@ -1774,7 +1600,7 @@
"upf",
"utopia"
],
- "time": "2020-07-04T22:14:07+00:00"
+ "time": "2020-10-24T08:51:37+00:00"
}
],
"packages-dev": [
@@ -1784,7 +1610,7 @@
"source": {
"type": "git",
"url": "https://github.com/appwrite/sdk-generator",
- "reference": "552f9d872210c8a689727dd3a661c163b3816686"
+ "reference": "ad1ee55f61967546c0889d377b628e244182311e"
},
"require": {
"ext-curl": "*",
@@ -1814,7 +1640,7 @@
}
],
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
- "time": "2020-09-08T12:57:50+00:00"
+ "time": "2020-10-20T10:23:43+00:00"
},
{
"name": "doctrine/instantiator",
@@ -2001,12 +1827,12 @@
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
- "reference": "a3409d10079990eeb489c3fead0ac070b5b38895"
+ "reference": "00aba97fc36feabc8d94667eebd5d43959e60008"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/a3409d10079990eeb489c3fead0ac070b5b38895",
- "reference": "a3409d10079990eeb489c3fead0ac070b5b38895",
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/00aba97fc36feabc8d94667eebd5d43959e60008",
+ "reference": "00aba97fc36feabc8d94667eebd5d43959e60008",
"shasum": ""
},
"require": {
@@ -2047,7 +1873,7 @@
"type": "tidelift"
}
],
- "time": "2020-08-28T16:31:07+00:00"
+ "time": "2020-10-01T09:35:15+00:00"
},
{
"name": "nikic/php-parser",
@@ -2419,12 +2245,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "a6037d775070cc82732c21809664c63fb4f19916"
+ "reference": "709a404472c4aabdf54c64d5ce98c6f3113f6bb4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/a6037d775070cc82732c21809664c63fb4f19916",
- "reference": "a6037d775070cc82732c21809664c63fb4f19916",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/709a404472c4aabdf54c64d5ce98c6f3113f6bb4",
+ "reference": "709a404472c4aabdf54c64d5ce98c6f3113f6bb4",
"shasum": ""
},
"require": {
@@ -2484,7 +2310,7 @@
"type": "github"
}
],
- "time": "2020-09-27T04:42:46+00:00"
+ "time": "2020-10-25T04:48:50+00:00"
},
{
"name": "phpunit/php-file-iterator",
@@ -2492,12 +2318,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
- "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8"
+ "reference": "9261b419918657b8414f50bad5dd7259ab883144"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8",
- "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/9261b419918657b8414f50bad5dd7259ab883144",
+ "reference": "9261b419918657b8414f50bad5dd7259ab883144",
"shasum": ""
},
"require": {
@@ -2540,7 +2366,7 @@
"type": "github"
}
],
- "time": "2020-09-28T05:57:25+00:00"
+ "time": "2020-10-25T04:50:35+00:00"
},
{
"name": "phpunit/php-invoker",
@@ -2548,12 +2374,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-invoker.git",
- "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67"
+ "reference": "4438206001579af6dd8cb5fde02ff6d1a7b56b83"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67",
- "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/4438206001579af6dd8cb5fde02ff6d1a7b56b83",
+ "reference": "4438206001579af6dd8cb5fde02ff6d1a7b56b83",
"shasum": ""
},
"require": {
@@ -2599,7 +2425,7 @@
"type": "github"
}
],
- "time": "2020-09-28T05:58:55+00:00"
+ "time": "2020-10-25T04:50:46+00:00"
},
{
"name": "phpunit/php-text-template",
@@ -2607,12 +2433,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-text-template.git",
- "reference": "18c887016e60e52477e54534956d7b47bc52cd84"
+ "reference": "da49b59805800de599d36c873d06d968212d4833"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/18c887016e60e52477e54534956d7b47bc52cd84",
- "reference": "18c887016e60e52477e54534956d7b47bc52cd84",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/da49b59805800de599d36c873d06d968212d4833",
+ "reference": "da49b59805800de599d36c873d06d968212d4833",
"shasum": ""
},
"require": {
@@ -2654,7 +2480,7 @@
"type": "github"
}
],
- "time": "2020-09-28T06:03:05+00:00"
+ "time": "2020-10-25T04:51:25+00:00"
},
{
"name": "phpunit/php-timer",
@@ -2662,12 +2488,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-timer.git",
- "reference": "c9ff14f493699e2f6adee9fd06a0245b276643b7"
+ "reference": "ef5018a5d81904ae1a8b5d998f1d16138b86aa42"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/c9ff14f493699e2f6adee9fd06a0245b276643b7",
- "reference": "c9ff14f493699e2f6adee9fd06a0245b276643b7",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/ef5018a5d81904ae1a8b5d998f1d16138b86aa42",
+ "reference": "ef5018a5d81904ae1a8b5d998f1d16138b86aa42",
"shasum": ""
},
"require": {
@@ -2709,20 +2535,20 @@
"type": "github"
}
],
- "time": "2020-09-28T06:00:25+00:00"
+ "time": "2020-10-25T04:50:56+00:00"
},
{
"name": "phpunit/phpunit",
- "version": "9.3.11",
+ "version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "f7316ea106df7c9507f4fdaa88c47bc10a3b27a1"
+ "reference": "bf6442de9f2867600e30acc538803a5911237f72"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f7316ea106df7c9507f4fdaa88c47bc10a3b27a1",
- "reference": "f7316ea106df7c9507f4fdaa88c47bc10a3b27a1",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/bf6442de9f2867600e30acc538803a5911237f72",
+ "reference": "bf6442de9f2867600e30acc538803a5911237f72",
"shasum": ""
},
"require": {
@@ -2737,23 +2563,23 @@
"phar-io/manifest": "^2.0.1",
"phar-io/version": "^3.0.2",
"php": ">=7.3",
- "phpspec/prophecy": "^1.11.1",
- "phpunit/php-code-coverage": "^9.1.11",
- "phpunit/php-file-iterator": "^3.0.4",
- "phpunit/php-invoker": "^3.1",
- "phpunit/php-text-template": "^2.0.2",
- "phpunit/php-timer": "^5.0.1",
- "sebastian/cli-parser": "^1.0",
- "sebastian/code-unit": "^1.0.5",
- "sebastian/comparator": "^4.0.3",
- "sebastian/diff": "^4.0.2",
- "sebastian/environment": "^5.1.2",
- "sebastian/exporter": "^4.0.2",
- "sebastian/global-state": "^5.0",
- "sebastian/object-enumerator": "^4.0.2",
- "sebastian/resource-operations": "^3.0.2",
- "sebastian/type": "^2.2.1",
- "sebastian/version": "^3.0.1"
+ "phpspec/prophecy": "^1.12.1",
+ "phpunit/php-code-coverage": "^9.2",
+ "phpunit/php-file-iterator": "^3.0.5",
+ "phpunit/php-invoker": "^3.1.1",
+ "phpunit/php-text-template": "^2.0.3",
+ "phpunit/php-timer": "^5.0.2",
+ "sebastian/cli-parser": "^1.0.1",
+ "sebastian/code-unit": "^1.0.6",
+ "sebastian/comparator": "^4.0.5",
+ "sebastian/diff": "^4.0.3",
+ "sebastian/environment": "^5.1.3",
+ "sebastian/exporter": "^4.0.3",
+ "sebastian/global-state": "^5.0.1",
+ "sebastian/object-enumerator": "^4.0.3",
+ "sebastian/resource-operations": "^3.0.3",
+ "sebastian/type": "^2.3",
+ "sebastian/version": "^3.0.2"
},
"require-dev": {
"ext-pdo": "*",
@@ -2769,7 +2595,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "9.3-dev"
+ "dev-master": "9.5-dev"
}
},
"autoload": {
@@ -2808,7 +2634,7 @@
"type": "github"
}
],
- "time": "2020-09-24T08:08:49+00:00"
+ "time": "2020-10-25T04:47:12+00:00"
},
{
"name": "sebastian/cli-parser",
@@ -2816,12 +2642,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/cli-parser.git",
- "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2"
+ "reference": "20af41a47fef3a828e400b9fa65a9e70014821fa"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2",
- "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2",
+ "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/20af41a47fef3a828e400b9fa65a9e70014821fa",
+ "reference": "20af41a47fef3a828e400b9fa65a9e70014821fa",
"shasum": ""
},
"require": {
@@ -2860,7 +2686,7 @@
"type": "github"
}
],
- "time": "2020-09-28T06:08:49+00:00"
+ "time": "2020-10-25T04:59:31+00:00"
},
{
"name": "sebastian/code-unit",
@@ -2868,12 +2694,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit.git",
- "reference": "d3a241b6028ff9d8e97d2b6ebd4090d01f92fad8"
+ "reference": "f18e2644f5c453eb800569ad19d829c50a5c231a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/d3a241b6028ff9d8e97d2b6ebd4090d01f92fad8",
- "reference": "d3a241b6028ff9d8e97d2b6ebd4090d01f92fad8",
+ "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/f18e2644f5c453eb800569ad19d829c50a5c231a",
+ "reference": "f18e2644f5c453eb800569ad19d829c50a5c231a",
"shasum": ""
},
"require": {
@@ -2912,7 +2738,7 @@
"type": "github"
}
],
- "time": "2020-09-28T05:28:46+00:00"
+ "time": "2020-10-25T04:49:06+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
@@ -2920,12 +2746,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
- "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5"
+ "reference": "c46c6a70d436c927b8a7c4a22b93219e0a57f116"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5",
- "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5",
+ "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/c46c6a70d436c927b8a7c4a22b93219e0a57f116",
+ "reference": "c46c6a70d436c927b8a7c4a22b93219e0a57f116",
"shasum": ""
},
"require": {
@@ -2963,7 +2789,7 @@
"type": "github"
}
],
- "time": "2020-09-28T05:30:19+00:00"
+ "time": "2020-10-25T04:49:16+00:00"
},
{
"name": "sebastian/comparator",
@@ -2971,12 +2797,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "7a8ff306445707539c1a6397372a982a1ec55120"
+ "reference": "1374f447d5707d2d1e690c6400c3034973007b1d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/7a8ff306445707539c1a6397372a982a1ec55120",
- "reference": "7a8ff306445707539c1a6397372a982a1ec55120",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1374f447d5707d2d1e690c6400c3034973007b1d",
+ "reference": "1374f447d5707d2d1e690c6400c3034973007b1d",
"shasum": ""
},
"require": {
@@ -3033,7 +2859,7 @@
"type": "github"
}
],
- "time": "2020-09-30T06:47:25+00:00"
+ "time": "2020-10-25T04:49:26+00:00"
},
{
"name": "sebastian/complexity",
@@ -3041,12 +2867,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/complexity.git",
- "reference": "ba8cc2da0c0bfbc813d03b56406734030c7f1eff"
+ "reference": "6536228719815a632cf51b28d0871fc2aa3b79c5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/ba8cc2da0c0bfbc813d03b56406734030c7f1eff",
- "reference": "ba8cc2da0c0bfbc813d03b56406734030c7f1eff",
+ "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/6536228719815a632cf51b28d0871fc2aa3b79c5",
+ "reference": "6536228719815a632cf51b28d0871fc2aa3b79c5",
"shasum": ""
},
"require": {
@@ -3086,7 +2912,7 @@
"type": "github"
}
],
- "time": "2020-09-28T06:05:03+00:00"
+ "time": "2020-10-25T04:51:35+00:00"
},
{
"name": "sebastian/diff",
@@ -3094,12 +2920,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "ffc949a1a2aae270ea064453d7535b82e4c32092"
+ "reference": "531bfd6f8d3deb09cf51f7a3f628ea6e1e8c8c03"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ffc949a1a2aae270ea064453d7535b82e4c32092",
- "reference": "ffc949a1a2aae270ea064453d7535b82e4c32092",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/531bfd6f8d3deb09cf51f7a3f628ea6e1e8c8c03",
+ "reference": "531bfd6f8d3deb09cf51f7a3f628ea6e1e8c8c03",
"shasum": ""
},
"require": {
@@ -3148,7 +2974,7 @@
"type": "github"
}
],
- "time": "2020-09-28T05:32:55+00:00"
+ "time": "2020-10-25T04:49:36+00:00"
},
{
"name": "sebastian/environment",
@@ -3156,12 +2982,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "388b6ced16caa751030f6a69e588299fa09200ac"
+ "reference": "6e46ab7acfa9793f848ea444355ad8407508b604"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac",
- "reference": "388b6ced16caa751030f6a69e588299fa09200ac",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6e46ab7acfa9793f848ea444355ad8407508b604",
+ "reference": "6e46ab7acfa9793f848ea444355ad8407508b604",
"shasum": ""
},
"require": {
@@ -3207,7 +3033,7 @@
"type": "github"
}
],
- "time": "2020-09-28T05:52:38+00:00"
+ "time": "2020-10-25T04:49:45+00:00"
},
{
"name": "sebastian/exporter",
@@ -3215,12 +3041,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65"
+ "reference": "fcfea176bfa64c9b76e9e326754fddcff97c0b91"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65",
- "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65",
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/fcfea176bfa64c9b76e9e326754fddcff97c0b91",
+ "reference": "fcfea176bfa64c9b76e9e326754fddcff97c0b91",
"shasum": ""
},
"require": {
@@ -3280,7 +3106,7 @@
"type": "github"
}
],
- "time": "2020-09-28T05:24:23+00:00"
+ "time": "2020-10-25T04:49:55+00:00"
},
{
"name": "sebastian/global-state",
@@ -3288,12 +3114,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
- "reference": "ea779cb749a478b22a2564ac41cd7bda79c78dc7"
+ "reference": "baec50db0ae2a69ecc95381249d04410da1f408d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/ea779cb749a478b22a2564ac41cd7bda79c78dc7",
- "reference": "ea779cb749a478b22a2564ac41cd7bda79c78dc7",
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/baec50db0ae2a69ecc95381249d04410da1f408d",
+ "reference": "baec50db0ae2a69ecc95381249d04410da1f408d",
"shasum": ""
},
"require": {
@@ -3340,7 +3166,7 @@
"type": "github"
}
],
- "time": "2020-09-28T05:54:06+00:00"
+ "time": "2020-10-25T04:50:06+00:00"
},
{
"name": "sebastian/lines-of-code",
@@ -3348,12 +3174,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/lines-of-code.git",
- "reference": "6514b8f21906b8b46f520d1fbd17a4523fa59a54"
+ "reference": "a1c2dd0ac77460dde453c7d50a51feca4d7eec97"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/6514b8f21906b8b46f520d1fbd17a4523fa59a54",
- "reference": "6514b8f21906b8b46f520d1fbd17a4523fa59a54",
+ "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/a1c2dd0ac77460dde453c7d50a51feca4d7eec97",
+ "reference": "a1c2dd0ac77460dde453c7d50a51feca4d7eec97",
"shasum": ""
},
"require": {
@@ -3393,7 +3219,7 @@
"type": "github"
}
],
- "time": "2020-09-28T06:07:27+00:00"
+ "time": "2020-10-25T04:51:46+00:00"
},
{
"name": "sebastian/object-enumerator",
@@ -3401,12 +3227,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-enumerator.git",
- "reference": "f6f5957013d84725427d361507e13513702888a4"
+ "reference": "fb188a20279fcdb1e31646765f477f6909d2425d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/f6f5957013d84725427d361507e13513702888a4",
- "reference": "f6f5957013d84725427d361507e13513702888a4",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/fb188a20279fcdb1e31646765f477f6909d2425d",
+ "reference": "fb188a20279fcdb1e31646765f477f6909d2425d",
"shasum": ""
},
"require": {
@@ -3446,7 +3272,7 @@
"type": "github"
}
],
- "time": "2020-09-28T05:55:06+00:00"
+ "time": "2020-10-25T04:50:16+00:00"
},
{
"name": "sebastian/object-reflector",
@@ -3454,12 +3280,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-reflector.git",
- "reference": "d9d0ab3b12acb1768bc1e0a89b23c90d2043cbe5"
+ "reference": "243921e7a4a5d7123446151debe9d2c5dbe51001"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/d9d0ab3b12acb1768bc1e0a89b23c90d2043cbe5",
- "reference": "d9d0ab3b12acb1768bc1e0a89b23c90d2043cbe5",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/243921e7a4a5d7123446151debe9d2c5dbe51001",
+ "reference": "243921e7a4a5d7123446151debe9d2c5dbe51001",
"shasum": ""
},
"require": {
@@ -3497,7 +3323,7 @@
"type": "github"
}
],
- "time": "2020-09-28T05:56:16+00:00"
+ "time": "2020-10-25T04:50:26+00:00"
},
{
"name": "sebastian/recursion-context",
@@ -3505,12 +3331,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
- "reference": "7e70f3d32a3058d4ad5226c1371f2dd4677dc073"
+ "reference": "8853f5bc9d57f00f3eeec81d21844766d1ab3d64"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/7e70f3d32a3058d4ad5226c1371f2dd4677dc073",
- "reference": "7e70f3d32a3058d4ad5226c1371f2dd4677dc073",
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/8853f5bc9d57f00f3eeec81d21844766d1ab3d64",
+ "reference": "8853f5bc9d57f00f3eeec81d21844766d1ab3d64",
"shasum": ""
},
"require": {
@@ -3556,7 +3382,7 @@
"type": "github"
}
],
- "time": "2020-09-28T05:27:00+00:00"
+ "time": "2020-10-25T04:51:06+00:00"
},
{
"name": "sebastian/resource-operations",
@@ -3615,12 +3441,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/type.git",
- "reference": "e494dcaeb89d1458c9ccd8c819745245a1669aea"
+ "reference": "1680f27f4bb5977f9be4fb25c21bd89e2cf91792"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/e494dcaeb89d1458c9ccd8c819745245a1669aea",
- "reference": "e494dcaeb89d1458c9ccd8c819745245a1669aea",
+ "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/1680f27f4bb5977f9be4fb25c21bd89e2cf91792",
+ "reference": "1680f27f4bb5977f9be4fb25c21bd89e2cf91792",
"shasum": ""
},
"require": {
@@ -3632,7 +3458,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.2-dev"
+ "dev-master": "2.3-dev"
}
},
"autoload": {
@@ -3659,7 +3485,7 @@
"type": "github"
}
],
- "time": "2020-09-28T06:01:38+00:00"
+ "time": "2020-10-25T04:51:16+00:00"
},
{
"name": "sebastian/version",
@@ -3746,20 +3572,20 @@
},
{
"name": "symfony/polyfill-ctype",
- "version": "dev-master",
+ "version": "dev-main",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
- "reference": "1c302646f6efc070cd46856e600e5e0684d6b454"
+ "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454",
- "reference": "1c302646f6efc070cd46856e600e5e0684d6b454",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f4ba089a5b6366e453971d3aad5fe8e897b37f41",
+ "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=7.1"
},
"suggest": {
"ext-ctype": "For best performance"
@@ -3767,7 +3593,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.18-dev"
+ "dev-main": "1.20-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -3818,24 +3644,24 @@
"type": "tidelift"
}
],
- "time": "2020-07-14T12:35:20+00:00"
+ "time": "2020-10-23T14:02:19+00:00"
},
{
"name": "symfony/polyfill-mbstring",
- "version": "dev-master",
+ "version": "dev-main",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "48928d471ede0548b399f54b0286fe0d0ed79267"
+ "reference": "39d483bdf39be819deabf04ec872eb0b2410b531"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/48928d471ede0548b399f54b0286fe0d0ed79267",
- "reference": "48928d471ede0548b399f54b0286fe0d0ed79267",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/39d483bdf39be819deabf04ec872eb0b2410b531",
+ "reference": "39d483bdf39be819deabf04ec872eb0b2410b531",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=7.1"
},
"suggest": {
"ext-mbstring": "For best performance"
@@ -3843,7 +3669,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.18-dev"
+ "dev-main": "1.20-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -3895,7 +3721,7 @@
"type": "tidelift"
}
],
- "time": "2020-09-14T11:01:58+00:00"
+ "time": "2020-10-23T14:02:19+00:00"
},
{
"name": "theseer/tokenizer",
@@ -3949,16 +3775,16 @@
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
- "reference": "f4aacffcbb556d443a15c4e49d62070903c05270"
+ "reference": "78173b3c850e344cb8515fc2a05138d39a6c39e0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/twigphp/Twig/zipball/f4aacffcbb556d443a15c4e49d62070903c05270",
- "reference": "f4aacffcbb556d443a15c4e49d62070903c05270",
+ "url": "https://api.github.com/repos/twigphp/Twig/zipball/78173b3c850e344cb8515fc2a05138d39a6c39e0",
+ "reference": "78173b3c850e344cb8515fc2a05138d39a6c39e0",
"shasum": ""
},
"require": {
- "php": ">=7.1.3",
+ "php": ">=7.2.5",
"symfony/polyfill-ctype": "^1.8",
"symfony/polyfill-mbstring": "^1.3"
},
@@ -4016,7 +3842,7 @@
"type": "tidelift"
}
],
- "time": "2020-09-27T05:01:29+00:00"
+ "time": "2020-10-21T12:45:52+00:00"
},
{
"name": "webmozart/assert",
@@ -4082,6 +3908,7 @@
"ext-yaml": "*",
"ext-dom": "*",
"ext-redis": "*",
+ "ext-swoole": "*",
"ext-pdo": "*",
"ext-openssl": "*",
"ext-zlib": "*",
diff --git a/docker-compose.nginx.yml b/docker-compose.nginx.yml
index ba79f4e4d..5cca223fb 100644
--- a/docker-compose.nginx.yml
+++ b/docker-compose.nginx.yml
@@ -133,7 +133,7 @@ services:
- appwrite-redis:/data:rw
clamav:
- image: appwrite/clamav:1.0.12
+ image: appwrite/clamav:1.2.0
container_name: appwrite-clamav
restart: unless-stopped
networks:
diff --git a/docker-compose.yml b/docker-compose.yml
index 19388e463..ad27815eb 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -294,9 +294,9 @@ services:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=rootsecretpassword
- - MYSQL_DATABASE=appwrite
- - MYSQL_USER=user
- - MYSQL_PASSWORD=password
+ - MYSQL_DATABASE=${_APP_DB_SCHEMA}
+ - MYSQL_USER=${_APP_DB_USER}
+ - MYSQL_PASSWORD=${_APP_DB_PASS}
command: 'mysqld --innodb-flush-method=fsync'
# command: mv /var/lib/mysql/ib_logfile0 /var/lib/mysql/ib_logfile0.bu && mv /var/lib/mysql/ib_logfile1 /var/lib/mysql/ib_logfile1.bu
@@ -331,7 +331,7 @@ services:
- appwrite-redis:/data:rw
clamav:
- image: appwrite/clamav:1.0.12
+ image: appwrite/clamav:1.2.0
container_name: appwrite-clamav
restart: unless-stopped
networks:
diff --git a/docs/references/account/create-session-oauth2.md b/docs/references/account/create-session-oauth2.md
index 459b62dc4..fb6fa41b2 100644
--- a/docs/references/account/create-session-oauth2.md
+++ b/docs/references/account/create-session-oauth2.md
@@ -1 +1 @@
-Allow the user to login to his account using the OAuth2 provider of his choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.
\ No newline at end of file
+Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.
\ No newline at end of file
diff --git a/docs/references/account/create-session.md b/docs/references/account/create-session.md
index f166b0bc9..03218ac6a 100644
--- a/docs/references/account/create-session.md
+++ b/docs/references/account/create-session.md
@@ -1 +1 @@
-Allow the user to login into his account by providing a valid email and password combination. This route will create a new session for the user.
\ No newline at end of file
+Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.
\ No newline at end of file
diff --git a/docs/references/account/create-verification.md b/docs/references/account/create-verification.md
index 54e0bf77b..3e6abf6a7 100644
--- a/docs/references/account/create-verification.md
+++ b/docs/references/account/create-verification.md
@@ -1,3 +1,3 @@
-Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](/docs/client/account#updateAccountVerification).
+Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](/docs/client/account#updateVerification).
Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.
diff --git a/docs/references/account/create.md b/docs/references/account/create.md
index a1f54f467..3b1aab75c 100644
--- a/docs/references/account/create.md
+++ b/docs/references/account/create.md
@@ -1 +1 @@
-Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [/account/verfication](/docs/client/account#createVerification) route to start verifying the user email address. To allow your new user to login to his new account, you need to create a new [account session](/docs/client/account#createSession).
\ No newline at end of file
+Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [/account/verfication](/docs/client/account#createVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](/docs/client/account#createSession).
\ No newline at end of file
diff --git a/docs/references/account/delete-session-current.md b/docs/references/account/delete-session-current.md
index d1393d5f6..d38520f47 100644
--- a/docs/references/account/delete-session-current.md
+++ b/docs/references/account/delete-session-current.md
@@ -1 +1 @@
-Use this endpoint to log out the currently logged in user from his account. When successful this endpoint will delete the user session and remove the session secret cookie from the user client.
\ No newline at end of file
+Use this endpoint to log out the currently logged in user from their account. When successful this endpoint will delete the user session and remove the session secret cookie from the user client.
\ No newline at end of file
diff --git a/docs/references/account/delete-session.md b/docs/references/account/delete-session.md
index 4184532fd..e0ca6d29a 100644
--- a/docs/references/account/delete-session.md
+++ b/docs/references/account/delete-session.md
@@ -1 +1 @@
-Use this endpoint to log out the currently logged in user from all his account sessions across all his different devices. When using the option id argument, only the session unique ID provider will be deleted.
\ No newline at end of file
+Use this endpoint to log out the currently logged in user from all their account sessions across all of their different devices. When using the option id argument, only the session unique ID provider will be deleted.
\ No newline at end of file
diff --git a/docs/references/database/delete-document.md b/docs/references/database/delete-document.md
index 254582120..00067751f 100644
--- a/docs/references/database/delete-document.md
+++ b/docs/references/database/delete-document.md
@@ -1 +1 @@
-Delete document by its unique ID. This endpoint deletes only the parent documents, his attributes and relations to other documents. Child documents **will not** be deleted.
\ No newline at end of file
+Delete document by its unique ID. This endpoint deletes only the parent documents, its attributes and relations to other documents. Child documents **will not** be deleted.
\ No newline at end of file
diff --git a/docs/references/teams/delete-team-membership.md b/docs/references/teams/delete-team-membership.md
index e2c884a3e..6302e3bf3 100644
--- a/docs/references/teams/delete-team-membership.md
+++ b/docs/references/teams/delete-team-membership.md
@@ -1 +1 @@
-This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if he didn't accept it.
\ No newline at end of file
+This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.
\ No newline at end of file
diff --git a/docs/references/teams/update-team-membership-status.md b/docs/references/teams/update-team-membership-status.md
index ad6e44f76..ae2da7677 100644
--- a/docs/references/teams/update-team-membership-status.md
+++ b/docs/references/teams/update-team-membership-status.md
@@ -1 +1 @@
-Use this endpoint to allow a user to accept an invitation to join a team after he is being redirected back to your app from the invitation email he was sent.
\ No newline at end of file
+Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email recieved by the user.
\ No newline at end of file
diff --git a/docs/tutorials/add-oauth2-provider.md b/docs/tutorials/add-oauth2-provider.md
index 5e1c07dab..5d46cac1f 100644
--- a/docs/tutorials/add-oauth2-provider.md
+++ b/docs/tutorials/add-oauth2-provider.md
@@ -6,7 +6,7 @@ This document is part of the Appwrite contributors' guide. Before you continue r
### Agenda
-OAuth2 providers help users to log in easily to apps and websites without the need to provide passwords or any other type of credentials. Appwrite's goal is to have support from as many **major** OAuth2 providers as possible.
+OAuth2 providers help users to log in to the apps and websites without the need to provide passwords or any other type of credentials. Appwrite's goal is to have support from as many **major** OAuth2 providers as possible.
As of the writing of these lines, we do not accept any minor OAuth2 providers. For us to accept some smaller and potentially unlimited number of OAuth2 providers, some product design and software architecture changes must be applied first.
@@ -47,10 +47,10 @@ Please mention in your documentation what resources or API docs you used to impl
After you finished adding your new provider to Appwrite you should be able to see it in your Appwrite console. Navigate to 'Project > Users > Providers' and check your new provider's settings form.
-Add credentials and check both a successful and a failed login (where the user rejects integration on provider page).
+Add credentials and check both a successful and a failed login (where the user denies integration on provider page).
You can test your OAuth2 provider by trying to login using the [OAuth2 method](https://appwrite.io/docs/client/account#createOAuth2Session) when integrating the Appwrite JS SDK in a demo app.
Pass your new adapter name as the provider parameter. If login is successful, you will be redirected to your success URL parameter. Otherwise, you will be redirected to your failure URL.
-If everything goes well, just submit a pull request and be ready to respond to any feedback which can arise during our code review.
+If everything goes well, submit a pull request and be ready to respond to any feedback which can arise during our code review.
diff --git a/docs/tutorials/environment-variables.md b/docs/tutorials/environment-variables.md
index 198717132..7de4c95e4 100644
--- a/docs/tutorials/environment-variables.md
+++ b/docs/tutorials/environment-variables.md
@@ -1,6 +1,6 @@
# Environment Variables
-Appwrite environment variables allow you to edit your server setup configuration and customize it. You can easily change the environment variables by changing them when running Appwrite using Docker CLI or Docker-Compose.
+Appwrite environment variables allow you to edit your server setup configuration and customize it. You can change the environment variables by changing them when running Appwrite using Docker CLI or Docker-Compose.
## General Options
@@ -10,7 +10,7 @@ Set your server running environment. By default, the var is set to 'development'
### _APP_OPTIONS_ABUSE
-Allows you to disable abuse checks and API rate limiting. By default, set to 'enabled'. To cancel the abuse checking, set to 'disabled'. It is not recommended to disable this feature in a production environment.
+Allows you to turn off abuse checks and API rate limiting. By default, set to 'enabled'. To cancel the abuse checking, set to 'disabled'. It is not recommended to turn off this feature in a production environment.
### _APP_OPTIONS_FORCE_HTTPS
@@ -26,7 +26,7 @@ Maximum file size allowed for file upload. The default value is 100MB limitation
### _APP_STORAGE_ANTIVIRUS
-This variable allows you to disable the internal anti-virus scans. By default, this value is set to 'enabled' to cancel the scans, set the value to 'disabled'. When disabled, it's recommended to turn off the ClamAV container for better resource usage.
+This variable allows you to disable the internal anti-virus scans. This value is set to 'enabled' by default, to cancel the scans set the value to 'disabled'. When disabled, it's recommended to turn off the ClamAV container for better resource usage.
### _APP_CONSOLE_WHITELIST_EMAILS
diff --git a/docs/tutorials/running-in-production.md b/docs/tutorials/running-in-production.md
index 2cbe4feec..2ed69d0ef 100644
--- a/docs/tutorials/running-in-production.md
+++ b/docs/tutorials/running-in-production.md
@@ -26,15 +26,15 @@ Appwrite was built with scalability in mind. Appwrite can potentially scale hori
Appwrite uses a few containers to run, where each container has its job. Most of the Appwrite containers are stateless, and in order to scale them, all you need is run multiple instances of them and setup a load balancer in front of them.
-If you decide to set up a load balancer for a specific container, make sure that the containers that are trying to communicate with him are accessing him trough a load balancer and not directly. All connections between Appwrite different containers are set using Docker environment variables.
+If you decide to set up a load balancer for a specific container, make sure that the containers that are trying to communicate with it are accessing it through a load balancer and not directly. All connections between Appwrite different containers are set using Docker environment variables.
-There are three Appwrite containers that do keep their state are the MariaDB, Redis, and InfluxDB containers that are used for storing data, cache, and stats (in this order). To scale them out, all you need to do is set up a standard cluster (just like you would with any other app using these technologies) according to your needs and performance.
+There are three Appwrite containers that do keep their state are the MariaDB, Redis, and InfluxDB containers that are used for storing data, cache, and stats (in this order). To scale them out, all you need to do is set up a standard cluster (same as you would with any other app using these technologies) according to your needs and performance.
## Sending Emails
Sending emails is hard. There are a lot of SPAM rules and configurations to master in order to set a functional SMTP server. The SMTP server that comes packaged with Appwrite is great for development but needs some work done to function well against SPAM filters. You can find some guidelines in this [tutorial]([https://www.digitalocean.com/community/tutorials/how-to-use-an-spf-record-to-prevent-spoofing-improve-e-mail-reliability](https://www.digitalocean.com/community/tutorials/how-to-use-an-spf-record-to-prevent-spoofing-improve-e-mail-reliability)).
-Another **easier option** is to use an ‘SMTP as a service’ product like [Sendgrid]([https://sendgrid.com/](https://sendgrid.com/)) or [Mailgun]([https://www.mailgun.com/](https://www.mailgun.com/)). You can change Appwrite SMTP settings and credentials to any 3rrd party provider you like who support SMTP integration using our [Docker environment variables]([https://github.com/appwrite/appwrite/blob/master/docs/tutorials/environment-variables.md#smtp](https://github.com/appwrite/appwrite/blob/master/docs/tutorials/environment-variables.md#smtp)). Most services offer a decent free tier to get started with.
+Another **easier option** is to use an ‘SMTP as a service’ product like [Sendgrid]([https://sendgrid.com/](https://sendgrid.com/)) or [Mailgun]([https://www.mailgun.com/](https://www.mailgun.com/)). You can change Appwrite SMTP settings and credentials to any 3rd party provider you like who support SMTP integration using our [Docker environment variables]([https://github.com/appwrite/appwrite/blob/master/docs/tutorials/environment-variables.md#smtp](https://github.com/appwrite/appwrite/blob/master/docs/tutorials/environment-variables.md#smtp)). Most services offer a decent free tier to get started with.
## Backups
@@ -42,4 +42,4 @@ Backups are highly recommended for any production environment. Currently, there
1. Create a script to backups and restore your MariaDB Appwrite schema. Note that trying to backup MariaDB using a docker volume backup can result in a corrupted copy of your data. It is recommended to use MariaDB or MySQL built-in tools for this.
2. Create a script to backups and restore your InfluxDB stats. If you don’t care much about your server stats, you can skip this.
-3. Create a script to backup Appwrite storage volume. There are many [online resources]([https://blog.ssdnodes.com/blog/docker-backup-volumes/](https://blog.ssdnodes.com/blog/docker-backup-volumes/)) explaining different ways to backup a docker volume. When running on multiple servers, it is very recommended to use an attachable storage point. Some cloud providers offer integrated backups to such attachable mount, some of them are GCP, AWS, DigitalOcean, and the list continues.
+3. Create a script to backup Appwrite storage volume. There are many [online resources]([https://blog.ssdnodes.com/blog/docker-backup-volumes/](https://blog.ssdnodes.com/blog/docker-backup-volumes/)) explaining different ways to backup a docker volume. When running on multiple servers, it is very recommended to use an attachable storage point. Some cloud providers offer integrated backups to such attachable mount like GCP, AWS, DigitalOcean, and the list continues.
diff --git a/public/images/oauth2/wordpress.png b/public/images/oauth2/wordpress.png
new file mode 100644
index 000000000..f1d664ada
Binary files /dev/null and b/public/images/oauth2/wordpress.png differ
diff --git a/src/Appwrite/Auth/OAuth2/WordPress.php b/src/Appwrite/Auth/OAuth2/WordPress.php
new file mode 100644
index 000000000..a83953405
--- /dev/null
+++ b/src/Appwrite/Auth/OAuth2/WordPress.php
@@ -0,0 +1,136 @@
+ $this->appID,
+ 'redirect_uri' => $this->callback,
+ 'response_type' => 'code',
+ 'scope' => $this->getScopes(),
+ 'state' => \json_encode($this->state)
+ ]);
+ }
+
+ /**
+ * @param string $code
+ *
+ * @return string
+ */
+ public function getAccessToken(string $code):string
+ {
+ $accessToken = $this->request(
+ 'POST',
+ 'https://public-api.wordpress.com/oauth2/token',
+ [],
+ \http_build_query([
+ 'client_id' => $this->appID,
+ 'redirect_uri' => $this->callback,
+ 'client_secret' => $this->appSecret,
+ 'grant_type' => 'authorization_code',
+ 'code' => $code
+ ])
+ );
+
+ $accessToken = \json_decode($accessToken, true);
+
+ if (isset($accessToken['access_token'])) {
+ return $accessToken['access_token'];
+ }
+
+ return '';
+ }
+
+ /**
+ * @param $accessToken
+ *
+ * @return string
+ */
+ public function getUserID(string $accessToken):string
+ {
+ $user = $this->getUser($accessToken);
+
+ if (isset($user['ID'])) {
+ return $user['ID'];
+ }
+
+ return '';
+ }
+
+ /**
+ * @param $accessToken
+ *
+ * @return string
+ */
+ public function getUserEmail(string $accessToken):string
+ {
+ $user = $this->getUser($accessToken);
+
+ if (isset($user['email']) && $user['verified']) {
+ return $user['email'];
+ }
+
+ return '';
+ }
+
+ /**
+ * @param $accessToken
+ *
+ * @return string
+ */
+ public function getUserName(string $accessToken):string
+ {
+ $user = $this->getUser($accessToken);
+
+ if (isset($user['username'])) {
+ return $user['username'];
+ }
+
+ return '';
+ }
+
+ /**
+ * @param string $accessToken
+ *
+ * @return array
+ */
+ protected function getUser(string $accessToken)
+ {
+ if (empty($this->user)) {
+ $this->user = \json_decode($this->request('GET', 'https://public-api.wordpress.com/rest/v1/me', ['Authorization: Bearer '.$accessToken]), true);
+ }
+
+ return $this->user;
+ }
+}
diff --git a/src/Appwrite/Extend/PDO.php b/src/Appwrite/Extend/PDO.php
index fce9165b4..384fc71be 100644
--- a/src/Appwrite/Extend/PDO.php
+++ b/src/Appwrite/Extend/PDO.php
@@ -62,6 +62,8 @@ class PDO extends PDONative
public function reconnect()
{
$this->pdo = new PDONative($this->dsn, $this->username, $this->passwd, $this->options);
+
+ echo '[PDO] MySQL connection restarted'.PHP_EOL;
// Connection settings
$this->pdo->setAttribute(PDONative::ATTR_DEFAULT_FETCH_MODE, PDONative::FETCH_ASSOC); // Return arrays
diff --git a/src/Appwrite/Preloader/Preloader.php b/src/Appwrite/Preloader/Preloader.php
deleted file mode 100644
index a03c0cb28..000000000
--- a/src/Appwrite/Preloader/Preloader.php
+++ /dev/null
@@ -1,139 +0,0 @@
-paths = $paths;
-
- $classMap = require __DIR__.'/../../../vendor/composer/autoload_classmap.php';
-
- $this->paths = \array_merge(
- $this->paths,
- \array_values($classMap)
- );
- }
-
- public function paths(string ...$paths): self
- {
- $this->paths = \array_merge(
- $this->paths,
- $paths
- );
-
- return $this;
- }
-
- public function ignore(string ...$names): self
- {
- foreach($names as $name) {
- if(is_readable($name)) {
- $this->ignores[] = $name;
- }
- else {
- echo "[Preloader] Failed to ignore path `{$name}`".PHP_EOL;
- }
- }
-
- return $this;
- }
-
- public function load(): void
- {
- $this->included = get_included_files();
-
- foreach ($this->paths as $path) {
- $this->loadPath(\rtrim($path, '/'));
- }
-
- $already = count($this->included);
-
- echo "[Preloader] Preloaded {$already} files.".PHP_EOL;
- }
-
- private function loadPath(string $path): void
- {
- if (\is_dir($path)) {
- $this->loadDir($path);
-
- return;
- }
-
- $this->loadFile($path);
- }
-
- private function loadDir(string $path): void
- {
- $handle = \opendir($path);
-
- while ($file = \readdir($handle)) {
- if (\in_array($file, ['.', '..'])) {
- continue;
- }
-
- $this->loadPath("{$path}/{$file}");
- }
-
- \closedir($handle);
- }
-
- private function loadFile(string $path): void
- {
- if ($this->shouldIgnore($path)) {
- return;
- }
-
- if(in_array(realpath($path), $this->included)) {
- // echo "[Preloader] Skiped `{$path}`".PHP_EOL;
- return;
- }
-
- // echo "[Preloader] Preloaded `{$path}`".PHP_EOL;
-
- try {
- // opcache_compile_file($path);
- require $path;
- } catch (\Throwable $th) {
- echo "[Preloader] Failed to load `{$path}`: ".$th->getMessage().PHP_EOL;
- return;
- }
-
- $this->included = array_merge(get_included_files(), [realpath($path)]);
- }
-
- private function shouldIgnore(?string $path): bool
- {
- if($path === null) {
- return true;
- }
-
- if(!\in_array(\pathinfo($path, PATHINFO_EXTENSION), ['php'])) {
- return true;
- }
-
- foreach ($this->ignores as $ignore) {
- if (\strpos($path, $ignore) === 0) {
- return true;
- }
- }
-
- return false;
- }
-}
\ No newline at end of file
diff --git a/tests/e2e/Client.php b/tests/e2e/Client.php
index 5a84716b5..e9a47c735 100644
--- a/tests/e2e/Client.php
+++ b/tests/e2e/Client.php
@@ -211,7 +211,7 @@ class Client
}
$responseBody = curl_exec($ch);
- $responseType = (isset($responseHeaders['content-type'])) ? $responseHeaders['content-type'] : '';
+ $responseType = $responseHeaders['content-type'] ?? '';
$responseStatus = curl_getinfo($ch, CURLINFO_HTTP_CODE);
switch (substr($responseType, 0, strpos($responseType, ';'))) {
diff --git a/tests/e2e/Services/Account/AccountBase.php b/tests/e2e/Services/Account/AccountBase.php
index 4e95148a6..d070ed3e7 100644
--- a/tests/e2e/Services/Account/AccountBase.php
+++ b/tests/e2e/Services/Account/AccountBase.php
@@ -65,8 +65,8 @@ trait AccountBase
public function testCreateAccountSession($data):array
{
sleep(10);
- $email = (isset($data['email'])) ? $data['email'] : '';
- $password = (isset($data['password'])) ? $data['password'] : '';
+ $email = $data['email'] ?? '';
+ $password = $data['password'] ?? '';
/**
* Test for SUCCESS
@@ -132,9 +132,9 @@ trait AccountBase
*/
public function testGetAccount($data):array
{
- $email = (isset($data['email'])) ? $data['email'] : '';
- $name = (isset($data['name'])) ? $data['name'] : '';
- $session = (isset($data['session'])) ? $data['session'] : '';
+ $email = $data['email'] ?? '';
+ $name = $data['name'] ?? '';
+ $session = $data['session'] ?? '';
/**
* Test for SUCCESS
@@ -183,7 +183,7 @@ trait AccountBase
*/
public function testGetAccountPrefs($data):array
{
- $session = (isset($data['session'])) ? $data['session'] : '';
+ $session = $data['session'] ?? '';
/**
* Test for SUCCESS
@@ -219,8 +219,8 @@ trait AccountBase
*/
public function testGetAccountSessions($data):array
{
- $session = (isset($data['session'])) ? $data['session'] : '';
- $sessionId = (isset($data['sessionId'])) ? $data['sessionId'] : '';
+ $session = $data['session'] ?? '';
+ $sessionId = $data['sessionId'] ?? '';
/**
* Test for SUCCESS
@@ -281,7 +281,7 @@ trait AccountBase
public function testGetAccountLogs($data):array
{
sleep(10);
- $session = (isset($data['session'])) ? $data['session'] : '';
+ $session = $data['session'] ?? '';
/**
* Test for SUCCESS
@@ -369,8 +369,8 @@ trait AccountBase
*/
public function testUpdateAccountName($data):array
{
- $email = (isset($data['email'])) ? $data['email'] : '';
- $session = (isset($data['session'])) ? $data['session'] : '';
+ $email = $data['email'] ?? '';
+ $session = $data['session'] ?? '';
$newName = 'New Name';
/**
@@ -436,9 +436,9 @@ trait AccountBase
*/
public function testUpdateAccountPassword($data):array
{
- $email = (isset($data['email'])) ? $data['email'] : '';
- $password = (isset($data['password'])) ? $data['password'] : '';
- $session = (isset($data['session'])) ? $data['session'] : '';
+ $email = $data['email'] ?? '';
+ $password = $data['password'] ?? '';
+ $session = $data['session'] ?? '';
/**
* Test for SUCCESS
@@ -505,7 +505,7 @@ trait AccountBase
public function testUpdateAccountEmail($data):array
{
$newEmail = uniqid().'new@localhost.test';
- $session = (isset($data['session'])) ? $data['session'] : '';
+ $session = $data['session'] ?? '';
/**
* Test for SUCCESS
@@ -561,7 +561,7 @@ trait AccountBase
public function testUpdateAccountPrefs($data):array
{
$newEmail = uniqid().'new@localhost.test';
- $session = (isset($data['session'])) ? $data['session'] : '';
+ $session = $data['session'] ?? '';
/**
* Test for SUCCESS
@@ -638,9 +638,9 @@ trait AccountBase
*/
public function testCreateAccountVerification($data):array
{
- $email = (isset($data['email'])) ? $data['email'] : '';
- $name = (isset($data['name'])) ? $data['name'] : '';
- $session = (isset($data['session'])) ? $data['session'] : '';
+ $email = $data['email'] ?? '';
+ $name = $data['name'] ?? '';
+ $session = $data['session'] ?? '';
/**
* Test for SUCCESS
@@ -703,9 +703,9 @@ trait AccountBase
*/
public function testUpdateAccountVerification($data):array
{
- $id = (isset($data['id'])) ? $data['id'] : '';
- $session = (isset($data['session'])) ? $data['session'] : '';
- $verification = (isset($data['verification'])) ? $data['verification'] : '';
+ $id = $data['id'] ?? '';
+ $session = $data['session'] ?? '';
+ $verification = $data['verification'] ?? '';
/**
* Test for SUCCESS
@@ -757,9 +757,9 @@ trait AccountBase
*/
public function testDeleteAccountSession($data):array
{
- $email = (isset($data['email'])) ? $data['email'] : '';
- $password = (isset($data['password'])) ? $data['password'] : '';
- $session = (isset($data['session'])) ? $data['session'] : '';
+ $email = $data['email'] ?? '';
+ $password = $data['password'] ?? '';
+ $session = $data['session'] ?? '';
/**
* Test for SUCCESS
@@ -825,8 +825,8 @@ trait AccountBase
*/
public function testDeleteAccountSessionCurrent($data):array
{
- $email = (isset($data['email'])) ? $data['email'] : '';
- $password = (isset($data['password'])) ? $data['password'] : '';
+ $email = $data['email'] ?? '';
+ $password = $data['password'] ?? '';
/**
* Test for SUCCESS
@@ -882,7 +882,7 @@ trait AccountBase
*/
public function testDeleteAccountSessions($data):array
{
- $session = (isset($data['session'])) ? $data['session'] : '';
+ $session = $data['session'] ?? '';
/**
* Test for SUCCESS
@@ -910,8 +910,8 @@ trait AccountBase
/**
* Create new fallback session
*/
- $email = (isset($data['email'])) ? $data['email'] : '';
- $password = (isset($data['password'])) ? $data['password'] : '';
+ $email = $data['email'] ?? '';
+ $password = $data['password'] ?? '';
$response = $this->client->call(Client::METHOD_POST, '/account/sessions', array_merge([
'origin' => 'http://localhost',
@@ -932,8 +932,8 @@ trait AccountBase
*/
public function testCreateAccountRecovery($data):array
{
- $email = (isset($data['email'])) ? $data['email'] : '';
- $name = (isset($data['name'])) ? $data['name'] : '';
+ $email = $data['email'] ?? '';
+ $name = $data['name'] ?? '';
/**
* Test for SUCCESS
@@ -1006,8 +1006,8 @@ trait AccountBase
*/
public function testUpdateAccountRecovery($data):array
{
- $id = (isset($data['id'])) ? $data['id'] : '';
- $recovery = (isset($data['recovery'])) ? $data['recovery'] : '';
+ $id = $data['id'] ?? '';
+ $recovery = $data['recovery'] ?? '';
$newPassowrd = 'test-recovery';
/**
diff --git a/tests/e2e/Services/Functions/FunctionsBase.php b/tests/e2e/Services/Functions/FunctionsBase.php
index 80ee47c72..a167b3763 100644
--- a/tests/e2e/Services/Functions/FunctionsBase.php
+++ b/tests/e2e/Services/Functions/FunctionsBase.php
@@ -13,7 +13,7 @@ trait FunctionsBase
// */
// public function testGetTeam($data):array
// {
- // $id = (isset($data['teamUid'])) ? $data['teamUid'] : '';
+ // $id = $data['teamUid'] ?? '';
// /**
// * Test for SUCCESS
diff --git a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php
index 7f0441a88..9aac86303 100644
--- a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php
+++ b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php
@@ -38,7 +38,7 @@ class FunctionsConsoleServerTest extends Scope
'timeout' => 10,
]);
- $functionId = (isset($response1['body']['$id'])) ? $response1['body']['$id'] : '';
+ $functionId = $response1['body']['$id'] ?? '';
$this->assertEquals(201, $response1['headers']['status-code']);
$this->assertNotEmpty($response1['body']['$id']);
@@ -186,7 +186,7 @@ class FunctionsConsoleServerTest extends Scope
'code' => new CURLFile(realpath(__DIR__ . '/../../../resources/functions/php-fx.tar.gz'), 'application/x-gzip', 'php-fx.tar.gz'),
]);
- $tagId = (isset($tag['body']['$id'])) ? $tag['body']['$id'] : '';
+ $tagId = $tag['body']['$id'] ?? '';
$this->assertEquals(201, $tag['headers']['status-code']);
$this->assertNotEmpty($tag['body']['$id']);
@@ -296,7 +296,7 @@ class FunctionsConsoleServerTest extends Scope
'async' => 1,
]);
- $executionId = (isset($execution['body']['$id'])) ? $execution['body']['$id'] : '';
+ $executionId = $execution['body']['$id'] ?? '';
$this->assertEquals(201, $execution['headers']['status-code']);
$this->assertNotEmpty($execution['body']['$id']);
diff --git a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php
index 7e4e6c1e4..ac3ff8724 100644
--- a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php
+++ b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php
@@ -79,7 +79,7 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testListProject($data):array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
/**
* Test for SUCCESS
@@ -106,7 +106,7 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testGetProject($data):array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
/**
* Test for SUCCESS
@@ -147,7 +147,7 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testGetProjectUsage($data):array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
/**
* Test for SUCCESS
@@ -206,7 +206,7 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testUpdateProject($data):array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
/**
* Test for SUCCESS
@@ -249,7 +249,7 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testUpdateProjectOAuth($data):array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
$providers = require('app/config/providers.php');
/**
@@ -307,7 +307,7 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testCreateProjectWebhook($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
$response = $this->client->call(Client::METHOD_POST, '/projects/'.$id.'/webhooks', array_merge([
'content-type' => 'application/json',
@@ -358,7 +358,7 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testListProjectWebhook($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/webhooks', array_merge([
'content-type' => 'application/json',
@@ -380,8 +380,8 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testGetProjectWebhook($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
- $webhookId = (isset($data['webhookId'])) ? $data['webhookId'] : '';
+ $id = $data['projectId'] ?? '';
+ $webhookId = $data['webhookId'] ?? '';
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/webhooks/'.$webhookId, array_merge([
'content-type' => 'application/json',
@@ -416,8 +416,8 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testUpdateProjectWebhook($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
- $webhookId = (isset($data['webhookId'])) ? $data['webhookId'] : '';
+ $id = $data['projectId'] ?? '';
+ $webhookId = $data['webhookId'] ?? '';
$response = $this->client->call(Client::METHOD_PUT, '/projects/'.$id.'/webhooks/'.$webhookId, array_merge([
'content-type' => 'application/json',
@@ -503,8 +503,8 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testDeleteProjectWebhook($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
- $webhookId = (isset($data['webhookId'])) ? $data['webhookId'] : '';
+ $id = $data['projectId'] ?? '';
+ $webhookId = $data['webhookId'] ?? '';
$response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/webhooks/'.$webhookId, array_merge([
'content-type' => 'application/json',
@@ -541,7 +541,7 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testCreateProjectKey($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
$response = $this->client->call(Client::METHOD_POST, '/projects/'.$id.'/keys', array_merge([
'content-type' => 'application/json',
@@ -581,7 +581,7 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testListProjectKey($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/keys', array_merge([
'content-type' => 'application/json',
@@ -603,8 +603,8 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testGetProjectKey($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
- $keyId = (isset($data['keyId'])) ? $data['keyId'] : '';
+ $id = $data['projectId'] ?? '';
+ $keyId = $data['keyId'] ?? '';
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/keys/'.$keyId, array_merge([
'content-type' => 'application/json',
@@ -638,8 +638,8 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testUpdateProjectKey($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
- $keyId = (isset($data['keyId'])) ? $data['keyId'] : '';
+ $id = $data['projectId'] ?? '';
+ $keyId = $data['keyId'] ?? '';
$response = $this->client->call(Client::METHOD_PUT, '/projects/'.$id.'/keys/'.$keyId, array_merge([
'content-type' => 'application/json',
@@ -693,8 +693,8 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testDeleteProjectKey($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
- $keyId = (isset($data['keyId'])) ? $data['keyId'] : '';
+ $id = $data['projectId'] ?? '';
+ $keyId = $data['keyId'] ?? '';
$response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/keys/'.$keyId, array_merge([
'content-type' => 'application/json',
@@ -731,7 +731,7 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testCreateProjectTask($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
$response = $this->client->call(Client::METHOD_POST, '/projects/'.$id.'/tasks', array_merge([
'content-type' => 'application/json',
@@ -859,7 +859,7 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testListProjectTask($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/tasks', array_merge([
'content-type' => 'application/json',
@@ -881,8 +881,8 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testGetProjectTask($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
- $taskId = (isset($data['taskId'])) ? $data['taskId'] : '';
+ $id = $data['projectId'] ?? '';
+ $taskId = $data['taskId'] ?? '';
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/tasks/'.$taskId, array_merge([
'content-type' => 'application/json',
@@ -921,8 +921,8 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testUpdateProjectTask($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
- $taskId = (isset($data['taskId'])) ? $data['taskId'] : '';
+ $id = $data['projectId'] ?? '';
+ $taskId = $data['taskId'] ?? '';
$response = $this->client->call(Client::METHOD_PUT, '/projects/'.$id.'/tasks/'.$taskId, array_merge([
'content-type' => 'application/json',
@@ -1087,8 +1087,8 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testDeleteProjectTask($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
- $taskId = (isset($data['taskId'])) ? $data['taskId'] : '';
+ $id = $data['projectId'] ?? '';
+ $taskId = $data['taskId'] ?? '';
$response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/tasks/'.$taskId, array_merge([
'content-type' => 'application/json',
@@ -1125,7 +1125,7 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testCreateProjectPlatform($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
$response = $this->client->call(Client::METHOD_POST, '/projects/'.$id.'/platforms', array_merge([
'content-type' => 'application/json',
@@ -1227,7 +1227,7 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testListProjectPlatform($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/platforms', array_merge([
'content-type' => 'application/json',
@@ -1249,9 +1249,9 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testGetProjectPlatform($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
- $platformWebId = (isset($data['platformWebId'])) ? $data['platformWebId'] : '';
+ $platformWebId = $data['platformWebId'] ?? '';
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/platforms/'.$platformWebId, array_merge([
'content-type' => 'application/json',
@@ -1267,7 +1267,7 @@ class ProjectsConsoleClientTest extends Scope
$this->assertEquals('', $response['body']['store']);
$this->assertEquals('localhost', $response['body']['hostname']);
- $platformFultteriOSId = (isset($data['platformFultteriOSId'])) ? $data['platformFultteriOSId'] : '';
+ $platformFultteriOSId = $data['platformFultteriOSId'] ?? '';
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/platforms/'.$platformFultteriOSId, array_merge([
'content-type' => 'application/json',
@@ -1283,7 +1283,7 @@ class ProjectsConsoleClientTest extends Scope
$this->assertEquals('', $response['body']['store']);
$this->assertEquals('', $response['body']['hostname']);
- $platformFultterAndroidId = (isset($data['platformFultterAndroidId'])) ? $data['platformFultterAndroidId'] : '';
+ $platformFultterAndroidId = $data['platformFultterAndroidId'] ?? '';
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/platforms/'.$platformFultterAndroidId, array_merge([
'content-type' => 'application/json',
@@ -1317,9 +1317,9 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testUpdateProjectPlatform($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
- $platformWebId = (isset($data['platformWebId'])) ? $data['platformWebId'] : '';
+ $platformWebId = $data['platformWebId'] ?? '';
$response = $this->client->call(Client::METHOD_PUT, '/projects/'.$id.'/platforms/'.$platformWebId, array_merge([
'content-type' => 'application/json',
@@ -1340,7 +1340,7 @@ class ProjectsConsoleClientTest extends Scope
$this->assertEquals('', $response['body']['store']);
$this->assertEquals('localhost-new', $response['body']['hostname']);
- $platformFultteriOSId = (isset($data['platformFultteriOSId'])) ? $data['platformFultteriOSId'] : '';
+ $platformFultteriOSId = $data['platformFultteriOSId'] ?? '';
$response = $this->client->call(Client::METHOD_PUT, '/projects/'.$id.'/platforms/'.$platformFultteriOSId, array_merge([
'content-type' => 'application/json',
@@ -1361,7 +1361,7 @@ class ProjectsConsoleClientTest extends Scope
$this->assertEquals('', $response['body']['store']);
$this->assertEquals('', $response['body']['hostname']);
- $platformFultterAndroidId = (isset($data['platformFultterAndroidId'])) ? $data['platformFultterAndroidId'] : '';
+ $platformFultterAndroidId = $data['platformFultterAndroidId'] ?? '';
$response = $this->client->call(Client::METHOD_PUT, '/projects/'.$id.'/platforms/'.$platformFultterAndroidId, array_merge([
'content-type' => 'application/json',
@@ -1394,9 +1394,9 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testDeleteProjectPlatform($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
- $platformWebId = (isset($data['platformWebId'])) ? $data['platformWebId'] : '';
+ $platformWebId = $data['platformWebId'] ?? '';
$response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/platforms/'.$platformWebId, array_merge([
'content-type' => 'application/json',
@@ -1413,7 +1413,7 @@ class ProjectsConsoleClientTest extends Scope
$this->assertEquals(404, $response['headers']['status-code']);
- $platformFultteriOSId = (isset($data['platformFultteriOSId'])) ? $data['platformFultteriOSId'] : '';
+ $platformFultteriOSId = $data['platformFultteriOSId'] ?? '';
$response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/platforms/'.$platformFultteriOSId, array_merge([
'content-type' => 'application/json',
@@ -1430,7 +1430,7 @@ class ProjectsConsoleClientTest extends Scope
$this->assertEquals(404, $response['headers']['status-code']);
- $platformFultterAndroidId = (isset($data['platformFultterAndroidId'])) ? $data['platformFultterAndroidId'] : '';
+ $platformFultterAndroidId = $data['platformFultterAndroidId'] ?? '';
$response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/platforms/'.$platformFultterAndroidId, array_merge([
'content-type' => 'application/json',
@@ -1467,7 +1467,7 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testCreateProjectDomain($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
$response = $this->client->call(Client::METHOD_POST, '/projects/'.$id.'/domains', array_merge([
'content-type' => 'application/json',
@@ -1506,7 +1506,7 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testListProjectDomain($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/domains', array_merge([
'content-type' => 'application/json',
@@ -1528,8 +1528,8 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testGetProjectDomain($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
- $domainId = (isset($data['domainId'])) ? $data['domainId'] : '';
+ $id = $data['projectId'] ?? '';
+ $domainId = $data['domainId'] ?? '';
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/domains/'.$domainId, array_merge([
'content-type' => 'application/json',
@@ -1563,8 +1563,8 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testUpdateProjectDomain($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
- $domainId = (isset($data['domainId'])) ? $data['domainId'] : '';
+ $id = $data['projectId'] ?? '';
+ $domainId = $data['domainId'] ?? '';
$response = $this->client->call(Client::METHOD_PATCH, '/projects/'.$id.'/domains/'.$domainId.'/verification', array_merge([
'content-type' => 'application/json',
@@ -1585,8 +1585,8 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testDeleteProjectDomain($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
- $domainId = (isset($data['domainId'])) ? $data['domainId'] : '';
+ $id = $data['projectId'] ?? '';
+ $domainId = $data['domainId'] ?? '';
$response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/domains/'.$domainId, array_merge([
'content-type' => 'application/json',
diff --git a/tests/e2e/Services/Teams/TeamsBase.php b/tests/e2e/Services/Teams/TeamsBase.php
index 73bdfe719..a8ac2ac43 100644
--- a/tests/e2e/Services/Teams/TeamsBase.php
+++ b/tests/e2e/Services/Teams/TeamsBase.php
@@ -75,7 +75,7 @@ trait TeamsBase
*/
public function testGetTeam($data):array
{
- $id = (isset($data['teamUid'])) ? $data['teamUid'] : '';
+ $id = $data['teamUid'] ?? '';
/**
* Test for SUCCESS
diff --git a/tests/e2e/Services/Teams/TeamsBaseClient.php b/tests/e2e/Services/Teams/TeamsBaseClient.php
index ceb0d86e5..25bbcbdd5 100644
--- a/tests/e2e/Services/Teams/TeamsBaseClient.php
+++ b/tests/e2e/Services/Teams/TeamsBaseClient.php
@@ -11,7 +11,7 @@ trait TeamsBaseClient
*/
public function testGetTeamMemberships($data):array
{
- $teamUid = (isset($data['teamUid'])) ? $data['teamUid'] : '';
+ $teamUid = $data['teamUid'] ?? '';
/**
* Test for SUCCESS
@@ -40,8 +40,8 @@ trait TeamsBaseClient
*/
public function testCreateTeamMembership($data):array
{
- $teamUid = (isset($data['teamUid'])) ? $data['teamUid'] : '';
- $teamName = (isset($data['teamName'])) ? $data['teamName'] : '';
+ $teamUid = $data['teamUid'] ?? '';
+ $teamName = $data['teamName'] ?? '';
$email = uniqid().'friend@localhost.test';
/**
@@ -127,10 +127,10 @@ trait TeamsBaseClient
*/
public function testUpdateTeamMembership($data):array
{
- $teamUid = (isset($data['teamUid'])) ? $data['teamUid'] : '';
- $secret = (isset($data['secret'])) ? $data['secret'] : '';
- $inviteUid = (isset($data['inviteUid'])) ? $data['inviteUid'] : '';
- $userUid = (isset($data['userUid'])) ? $data['userUid'] : '';
+ $teamUid = $data['teamUid'] ?? '';
+ $secret = $data['secret'] ?? '';
+ $inviteUid = $data['inviteUid'] ?? '';
+ $userUid = $data['userUid'] ?? '';
/**
* Test for SUCCESS
@@ -207,8 +207,8 @@ trait TeamsBaseClient
*/
public function testDeleteTeamMembership($data):array
{
- $teamUid = (isset($data['teamUid'])) ? $data['teamUid'] : '';
- $inviteUid = (isset($data['inviteUid'])) ? $data['inviteUid'] : '';
+ $teamUid = $data['teamUid'] ?? '';
+ $inviteUid = $data['inviteUid'] ?? '';
/**
* Test for SUCCESS
diff --git a/tests/e2e/Services/Teams/TeamsBaseServer.php b/tests/e2e/Services/Teams/TeamsBaseServer.php
index 1547a4e28..9869ce590 100644
--- a/tests/e2e/Services/Teams/TeamsBaseServer.php
+++ b/tests/e2e/Services/Teams/TeamsBaseServer.php
@@ -11,7 +11,7 @@ trait TeamsBaseServer
*/
public function testGetTeamMemberships($data):array
{
- $id = (isset($data['teamUid'])) ? $data['teamUid'] : '';
+ $id = $data['teamUid'] ?? '';
/**
* Test for SUCCESS
@@ -37,8 +37,8 @@ trait TeamsBaseServer
*/
public function testCreateTeamMembership($data):array
{
- $teamUid = (isset($data['teamUid'])) ? $data['teamUid'] : '';
- $teamName = (isset($data['teamName'])) ? $data['teamName'] : '';
+ $teamUid = $data['teamUid'] ?? '';
+ $teamName = $data['teamName'] ?? '';
$email = uniqid().'friend@localhost.test';
/**
diff --git a/tests/resources/docker/docker-compose.yml b/tests/resources/docker/docker-compose.yml
index 4a3192947..8309ce62d 100644
--- a/tests/resources/docker/docker-compose.yml
+++ b/tests/resources/docker/docker-compose.yml
@@ -320,7 +320,7 @@ services:
- appwrite-redis:/data:rw
clamav:
- image: appwrite/clamav:1.0.12
+ image: appwrite/clamav:1.2.0
container_name: appwrite-clamav
restart: unless-stopped
networks:
diff --git a/tests/unit/General/ExtensionsTest.php b/tests/unit/General/ExtensionsTest.php
new file mode 100644
index 000000000..2a7c9d58e
--- /dev/null
+++ b/tests/unit/General/ExtensionsTest.php
@@ -0,0 +1,117 @@
+assertEquals(true, extension_loaded('redis'));
+ }
+
+ public function testSwoole()
+ {
+ $this->assertEquals(true, extension_loaded('swoole'));
+ }
+
+ public function testYAML()
+ {
+ $this->assertEquals(true, extension_loaded('yaml'));
+ }
+
+ public function testOPCache()
+ {
+ $this->assertEquals(true, extension_loaded('Zend OPcache'));
+ }
+
+ public function testDOM()
+ {
+ $this->assertEquals(true, extension_loaded('dom'));
+ }
+
+ public function testPDO()
+ {
+ $this->assertEquals(true, extension_loaded('PDO'));
+ }
+
+ public function testImagick()
+ {
+ $this->assertEquals(true, extension_loaded('imagick'));
+ }
+
+ public function testJSON()
+ {
+ $this->assertEquals(true, extension_loaded('json'));
+ }
+
+ public function testCURL()
+ {
+ $this->assertEquals(true, extension_loaded('curl'));
+ }
+
+ public function testMBString()
+ {
+ $this->assertEquals(true, extension_loaded('mbstring'));
+ }
+
+ public function testOPENSSL()
+ {
+ $this->assertEquals(true, extension_loaded('openssl'));
+ }
+
+ public function testZLIB()
+ {
+ $this->assertEquals(true, extension_loaded('zlib'));
+ }
+
+ public function testSockets()
+ {
+ $this->assertEquals(true, extension_loaded('sockets'));
+ }
+
+ public function testMaxminddb()
+ {
+ $this->assertEquals(true, extension_loaded('maxminddb'));
+ }
+}