diff --git a/app/views/install/compose.phtml b/app/views/install/compose.phtml
index 49d599a7dd..089bb438f0 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 515fbb7b0d..73d61107e5 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/functions.php b/app/workers/functions.php
index 8cbe221e1e..2967430267 100644
--- a/app/workers/functions.php
+++ b/app/workers/functions.php
@@ -29,7 +29,7 @@ Co\run(function() use ($environments) {
Console::info('Warming up '.$environment['name'].' environment');
- Console::execute('docker pull '.$environment['image'], null, $stdout, $stderr);
+ Console::execute('docker pull '.$environment['image'], '', $stdout, $stderr);
if(!empty($stdout)) {
Console::log($stdout);
@@ -211,7 +211,7 @@ class FunctionsV1
$executionStart = \microtime(true);
$exitCode = Console::execute('docker ps --all --format "name={{.Names}}&status={{.Status}}&labels={{.Labels}}" --filter label=appwrite-type=function'
- , null, $stdout, $stderr, 30);
+ , '', $stdout, $stderr, 30);
$executionEnd = \microtime(true);
@@ -249,7 +249,7 @@ class FunctionsV1
$stdout = '';
$stderr = '';
- if(Console::execute("docker rm {$container}", null, $stdout, $stderr, 30) !== 0) {
+ if(Console::execute("docker rm {$container}", '', $stdout, $stderr, 30) !== 0) {
throw new Exception('Failed to remove offline container: '.$stderr);
}
@@ -277,7 +277,7 @@ class FunctionsV1
".\implode("\n", $vars)."
{$environment['image']} \
sh -c 'mv /tmp/code.tar.gz /usr/local/src/code.tar.gz && tar -zxf /usr/local/src/code.tar.gz --strip 1 && rm /usr/local/src/code.tar.gz && tail -f /dev/null'"
- , null, $stdout, $stderr, 30);
+ , '', $stdout, $stderr, 30);
$executionEnd = \microtime(true);
@@ -297,7 +297,7 @@ class FunctionsV1
$executionStart = \microtime(true);
$exitCode = Console::execute("docker exec {$container} {$command}"
- , null, $stdout, $stderr, $function->getAttribute('timeout', (int) App::getEnv('_APP_FUNCTIONS_TIMEOUT', 900)));
+ , '', $stdout, $stderr, $function->getAttribute('timeout', (int) App::getEnv('_APP_FUNCTIONS_TIMEOUT', 900)));
$executionEnd = \microtime(true);
@@ -345,7 +345,7 @@ class FunctionsV1
$stdout = '';
$stderr = '';
- if(Console::execute("docker stop {$first['name']}", null, $stdout, $stderr, 30) !== 0) {
+ if(Console::execute("docker stop {$first['name']}", '', $stdout, $stderr, 30) !== 0) {
Console::error('Failed to remove container: '.$stderr);
}
diff --git a/app/workers/tasks.php b/app/workers/tasks.php
index ca82abe59b..f654748a6d 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 25691a108c..cfbc8a6712 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 0000000000..19e3f1ebf2
--- /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 f0ce2624cb..bf121686a8 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": "*",
@@ -33,29 +34,30 @@
"appwrite/php-clamav": "1.0.*",
- "utopia-php/framework": "0.9.1",
+ "utopia-php/framework": "0.9.6",
"utopia-php/abuse": "0.2.*",
"utopia-php/audit": "0.3.*",
"utopia-php/cache": "0.2.*",
- "utopia-php/cli": "0.7.1",
+ "utopia-php/cli": "0.7.2",
"utopia-php/config": "0.2.*",
"utopia-php/locale": "0.3.*",
"utopia-php/registry": "0.2.*",
- "utopia-php/domains": "1.1.*",
+ "utopia-php/preloader": "0.2.*",
+ "utopia-php/domains": "0.2.*",
"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.*",
"influxdb/influxdb-php": "1.15.*",
- "bacon/bacon-qr-code": "2.0.2",
- "phpmailer/phpmailer": "6.1.7"
+ "phpmailer/phpmailer": "6.1.7",
+ "chillerlan/php-qrcode": "^4.2"
},
"require-dev": {
- "swoole/ide-helper": "4.5.4",
+ "swoole/ide-helper": "4.5.5",
"appwrite/sdk-generator": "master",
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^9.3",
+ "vimeo/psalm": "4.0.1"
},
"repositories": [
{
@@ -72,4 +74,4 @@
"php": "7.4"
}
}
-}
\ No newline at end of file
+}
diff --git a/composer.lock b/composer.lock
index 1392b6fdd0..bb21ed0419 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "07a5b2d2e742e8651d58889c3253c3b5",
+ "content-hash": "7ad12180c132b3225874c7f18594409a",
"packages": [
{
"name": "appwrite/php-clamav",
@@ -101,17 +101,136 @@
"time": "2020-07-30T16:40:58+00:00"
},
{
- "name": "colinmollenhour/credis",
- "version": "1.11.2",
+ "name": "chillerlan/php-qrcode",
+ "version": "4.1.0",
"source": {
"type": "git",
- "url": "https://github.com/colinmollenhour/credis.git",
- "reference": "b8b2bd6b87d2d4df67065f3510efb80d5f9c4e53"
+ "url": "https://github.com/chillerlan/php-qrcode.git",
+ "reference": "2cecb32cf618319dd01d9bc1fa64dc6bb683df85"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/colinmollenhour/credis/zipball/b8b2bd6b87d2d4df67065f3510efb80d5f9c4e53",
- "reference": "b8b2bd6b87d2d4df67065f3510efb80d5f9c4e53",
+ "url": "https://api.github.com/repos/chillerlan/php-qrcode/zipball/2cecb32cf618319dd01d9bc1fa64dc6bb683df85",
+ "reference": "2cecb32cf618319dd01d9bc1fa64dc6bb683df85",
+ "shasum": ""
+ },
+ "require": {
+ "chillerlan/php-settings-container": "^2.0",
+ "ext-mbstring": "*",
+ "php": "^7.4"
+ },
+ "require-dev": {
+ "phan/phan": "^2.7",
+ "phpunit/phpunit": "^9.1",
+ "setasign/fpdf": "^1.8.2"
+ },
+ "suggest": {
+ "chillerlan/php-authenticator": "Yet another Google authenticator! Also creates URIs for mobile apps.",
+ "setasign/fpdf": "Required to use the QR FPDF output."
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "chillerlan\\QRCode\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Kazuhiko Arase",
+ "homepage": "https://github.com/kazuhikoarase"
+ },
+ {
+ "name": "Smiley",
+ "email": "smiley@chillerlan.net",
+ "homepage": "https://github.com/codemasher"
+ },
+ {
+ "name": "Contributors",
+ "homepage": "https://github.com/chillerlan/php-qrcode/graphs/contributors"
+ }
+ ],
+ "description": "A QR code generator. PHP 7.4+",
+ "homepage": "https://github.com/chillerlan/php-qrcode",
+ "keywords": [
+ "phpqrcode",
+ "qr",
+ "qr code",
+ "qrcode",
+ "qrcode-generator"
+ ],
+ "funding": [
+ {
+ "url": "https://ko-fi.com/codemasher",
+ "type": "ko_fi"
+ }
+ ],
+ "time": "2020-06-04T17:07:12+00:00"
+ },
+ {
+ "name": "chillerlan/php-settings-container",
+ "version": "2.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/chillerlan/php-settings-container.git",
+ "reference": "75888345532373074fba482a6642c0f8cda996f0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/chillerlan/php-settings-container/zipball/75888345532373074fba482a6642c0f8cda996f0",
+ "reference": "75888345532373074fba482a6642c0f8cda996f0",
+ "shasum": ""
+ },
+ "require": {
+ "ext-json": "*",
+ "php": "^7.4"
+ },
+ "require-dev": {
+ "phan/phan": "^2.6",
+ "phpunit/phpunit": "^9.1"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "chillerlan\\Settings\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Smiley",
+ "email": "smiley@chillerlan.net",
+ "homepage": "https://github.com/codemasher"
+ }
+ ],
+ "description": "A container class for immutable settings objects. Not a DI container. PHP 7.4+",
+ "homepage": "https://github.com/chillerlan/php-settings-container",
+ "keywords": [
+ "PHP7",
+ "Settings",
+ "container",
+ "helper"
+ ],
+ "time": "2020-04-16T16:56:44+00:00"
+ },
+ {
+ "name": "colinmollenhour/credis",
+ "version": "v1.11.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/colinmollenhour/credis.git",
+ "reference": "b458b7c65d156744f5f0c4667c0f8ce45d955435"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/colinmollenhour/credis/zipball/b458b7c65d156744f5f0c4667c0f8ce45d955435",
+ "reference": "b458b7c65d156744f5f0c4667c0f8ce45d955435",
"shasum": ""
},
"require": {
@@ -138,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": {
@@ -251,7 +300,7 @@
"enum",
"map"
],
- "time": "2020-07-30T16:37:13+00:00"
+ "time": "2020-10-02T16:03:48+00:00"
},
{
"name": "domnikl/statsd",
@@ -357,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": {
@@ -436,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": {
@@ -506,7 +502,7 @@
"type": "github"
}
],
- "time": "2020-09-30T15:03:52+00:00"
+ "time": "2020-10-10T11:47:56+00:00"
},
{
"name": "guzzlehttp/promises",
@@ -514,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": {
@@ -557,7 +553,7 @@
"keywords": [
"promise"
],
- "time": "2020-09-30T07:37:28+00:00"
+ "time": "2020-10-19T16:50:15+00:00"
},
{
"name": "guzzlehttp/psr7",
@@ -565,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": {
@@ -628,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",
@@ -691,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",
@@ -1237,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": {
@@ -1254,7 +1144,8 @@
"php": ">=7.1"
},
"require-dev": {
- "phpunit/phpunit": "^7.0"
+ "phpunit/phpunit": "^9.4",
+ "vimeo/psalm": "4.0.1"
},
"type": "library",
"autoload": {
@@ -1280,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": {
@@ -1301,7 +1192,8 @@
"php": ">=7.1"
},
"require-dev": {
- "phpunit/phpunit": "^7.0"
+ "phpunit/phpunit": "^9.3",
+ "vimeo/psalm": "4.0.1"
},
"type": "library",
"autoload": {
@@ -1327,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": {
@@ -1374,20 +1267,20 @@
"upf",
"utopia"
],
- "time": "2020-06-20T11:43:40+00:00"
+ "time": "2020-10-24T10:11:01+00:00"
},
{
"name": "utopia-php/cli",
- "version": "0.7.1",
+ "version": "0.7.2",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/cli.git",
- "reference": "97e6e027a8d6fa752815acae984ed48daa76a5e8"
+ "reference": "0b19cd33b86deb6aeb26bfdabc18bd2bdf5eba04"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/utopia-php/cli/zipball/97e6e027a8d6fa752815acae984ed48daa76a5e8",
- "reference": "97e6e027a8d6fa752815acae984ed48daa76a5e8",
+ "url": "https://api.github.com/repos/utopia-php/cli/zipball/0b19cd33b86deb6aeb26bfdabc18bd2bdf5eba04",
+ "reference": "0b19cd33b86deb6aeb26bfdabc18bd2bdf5eba04",
"shasum": ""
},
"require": {
@@ -1395,7 +1288,8 @@
"utopia-php/framework": "0.*.*"
},
"require-dev": {
- "phpunit/phpunit": "^7.0"
+ "phpunit/phpunit": "^9.3",
+ "vimeo/psalm": "4.0.1"
},
"type": "library",
"autoload": {
@@ -1422,27 +1316,28 @@
"upf",
"utopia"
],
- "time": "2020-09-15T19:57:49+00:00"
+ "time": "2020-10-23T13:34:41+00:00"
},
{
"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": {
@@ -1468,27 +1363,28 @@
"upf",
"utopia"
],
- "time": "2020-06-20T11:38:58+00:00"
+ "time": "2020-10-24T09:49:09+00:00"
},
{
"name": "utopia-php/domains",
- "version": "v1.1.0",
+ "version": "0.2.3",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/domains.git",
- "reference": "1665e1d9932afa3be63b5c1e0dcfe01fe77d8e73"
+ "reference": "6c9b3706b0df4e0150a1f9062321ff114270a643"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/utopia-php/domains/zipball/1665e1d9932afa3be63b5c1e0dcfe01fe77d8e73",
- "reference": "1665e1d9932afa3be63b5c1e0dcfe01fe77d8e73",
+ "url": "https://api.github.com/repos/utopia-php/domains/zipball/6c9b3706b0df4e0150a1f9062321ff114270a643",
+ "reference": "6c9b3706b0df4e0150a1f9062321ff114270a643",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"require-dev": {
- "phpunit/phpunit": "^7.0"
+ "phpunit/phpunit": "^9.3",
+ "vimeo/psalm": "4.0.1"
},
"type": "library",
"autoload": {
@@ -1518,27 +1414,28 @@
"upf",
"utopia"
],
- "time": "2020-02-23T07:40:02+00:00"
+ "time": "2020-10-23T09:59:51+00:00"
},
{
"name": "utopia-php/framework",
- "version": "0.9.1",
+ "version": "0.9.6",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/framework.git",
- "reference": "1c33b92b9188fb11b2ae70a4b7cf51844e07aa2e"
+ "reference": "959767e401c0497f0ddf31446d8d4dfa125aa5dc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/utopia-php/framework/zipball/1c33b92b9188fb11b2ae70a4b7cf51844e07aa2e",
- "reference": "1c33b92b9188fb11b2ae70a4b7cf51844e07aa2e",
+ "url": "https://api.github.com/repos/utopia-php/framework/zipball/959767e401c0497f0ddf31446d8d4dfa125aa5dc",
+ "reference": "959767e401c0497f0ddf31446d8d4dfa125aa5dc",
"shasum": ""
},
"require": {
- "php": ">=7.0.0"
+ "php": ">=7.3.0"
},
"require-dev": {
- "phpunit/phpunit": "^7.0"
+ "phpunit/phpunit": "^9.4",
+ "vimeo/psalm": "4.0.1"
},
"type": "library",
"autoload": {
@@ -1562,27 +1459,28 @@
"php",
"upf"
],
- "time": "2020-09-09T19:50:26+00:00"
+ "time": "2020-10-26T00:20:11+00:00"
},
{
"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": {
@@ -1608,27 +1506,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": {
@@ -1655,17 +1603,173 @@
"upf",
"utopia"
],
- "time": "2020-07-04T22:14:07+00:00"
+ "time": "2020-10-24T08:51:37+00:00"
}
],
"packages-dev": [
+ {
+ "name": "amphp/amp",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/amphp/amp.git",
+ "reference": "eb2f325586bc6ebb12d27834fc779fa140c38a57"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/amphp/amp/zipball/eb2f325586bc6ebb12d27834fc779fa140c38a57",
+ "reference": "eb2f325586bc6ebb12d27834fc779fa140c38a57",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7"
+ },
+ "require-dev": {
+ "amphp/php-cs-fixer-config": "dev-master",
+ "amphp/phpunit-util": "^1",
+ "ext-json": "*",
+ "jetbrains/phpstorm-stubs": "^2019.3",
+ "phpunit/phpunit": "^6.0.9 | ^7",
+ "psalm/phar": "^3.11@dev",
+ "react/promise": "^2"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Amp\\": "lib"
+ },
+ "files": [
+ "lib/functions.php",
+ "lib/Internal/functions.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Daniel Lowrey",
+ "email": "rdlowrey@php.net"
+ },
+ {
+ "name": "Aaron Piotrowski",
+ "email": "aaron@trowski.com"
+ },
+ {
+ "name": "Bob Weinand",
+ "email": "bobwei9@hotmail.com"
+ },
+ {
+ "name": "Niklas Keller",
+ "email": "me@kelunik.com"
+ }
+ ],
+ "description": "A non-blocking concurrency framework for PHP applications.",
+ "homepage": "http://amphp.org/amp",
+ "keywords": [
+ "async",
+ "asynchronous",
+ "awaitable",
+ "concurrency",
+ "event",
+ "event-loop",
+ "future",
+ "non-blocking",
+ "promise"
+ ],
+ "funding": [
+ {
+ "url": "https://github.com/amphp",
+ "type": "github"
+ }
+ ],
+ "time": "2020-10-10T13:54:50+00:00"
+ },
+ {
+ "name": "amphp/byte-stream",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/amphp/byte-stream.git",
+ "reference": "f813a658f0446192c5e17f96727070ee9342b93a"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/amphp/byte-stream/zipball/f813a658f0446192c5e17f96727070ee9342b93a",
+ "reference": "f813a658f0446192c5e17f96727070ee9342b93a",
+ "shasum": ""
+ },
+ "require": {
+ "amphp/amp": "^2",
+ "php": ">=7.1"
+ },
+ "require-dev": {
+ "amphp/php-cs-fixer-config": "dev-master",
+ "amphp/phpunit-util": "^1.4",
+ "friendsofphp/php-cs-fixer": "^2.3",
+ "jetbrains/phpstorm-stubs": "^2019.3",
+ "phpunit/phpunit": "^6 || ^7 || ^8",
+ "psalm/phar": "^3.11.4"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Amp\\ByteStream\\": "lib"
+ },
+ "files": [
+ "lib/functions.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Aaron Piotrowski",
+ "email": "aaron@trowski.com"
+ },
+ {
+ "name": "Niklas Keller",
+ "email": "me@kelunik.com"
+ }
+ ],
+ "description": "A stream abstraction to make working with non-blocking I/O simple.",
+ "homepage": "http://amphp.org/byte-stream",
+ "keywords": [
+ "amp",
+ "amphp",
+ "async",
+ "io",
+ "non-blocking",
+ "stream"
+ ],
+ "funding": [
+ {
+ "url": "https://github.com/amphp",
+ "type": "github"
+ }
+ ],
+ "time": "2020-08-30T19:23:04+00:00"
+ },
{
"name": "appwrite/sdk-generator",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/appwrite/sdk-generator",
- "reference": "552f9d872210c8a689727dd3a661c163b3816686"
+ "reference": "ad1ee55f61967546c0889d377b628e244182311e"
},
"require": {
"ext-curl": "*",
@@ -1695,7 +1799,243 @@
}
],
"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": "composer/package-versions-deprecated",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/composer/package-versions-deprecated.git",
+ "reference": "c8c9aa8a14cc3d3bec86d0a8c3fa52ea79936855"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/c8c9aa8a14cc3d3bec86d0a8c3fa52ea79936855",
+ "reference": "c8c9aa8a14cc3d3bec86d0a8c3fa52ea79936855",
+ "shasum": ""
+ },
+ "require": {
+ "composer-plugin-api": "^1.1.0 || ^2.0",
+ "php": "^7 || ^8"
+ },
+ "replace": {
+ "ocramius/package-versions": "1.11.99"
+ },
+ "require-dev": {
+ "composer/composer": "^1.9.3 || ^2.0@dev",
+ "ext-zip": "^1.13",
+ "phpunit/phpunit": "^6.5 || ^7"
+ },
+ "type": "composer-plugin",
+ "extra": {
+ "class": "PackageVersions\\Installer",
+ "branch-alias": {
+ "dev-master": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "PackageVersions\\": "src/PackageVersions"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Marco Pivetta",
+ "email": "ocramius@gmail.com"
+ },
+ {
+ "name": "Jordi Boggiano",
+ "email": "j.boggiano@seld.be"
+ }
+ ],
+ "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)",
+ "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-25T05:50:16+00:00"
+ },
+ {
+ "name": "composer/semver",
+ "version": "dev-main",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/composer/semver.git",
+ "reference": "4089fddb67bcf6bf860d91b979e95be303835002"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/composer/semver/zipball/4089fddb67bcf6bf860d91b979e95be303835002",
+ "reference": "4089fddb67bcf6bf860d91b979e95be303835002",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.3.2 || ^7.0 || ^8.0"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "^0.12.19",
+ "symfony/phpunit-bridge": "^4.2 || ^5"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "3.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Composer\\Semver\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nils Adermann",
+ "email": "naderman@naderman.de",
+ "homepage": "http://www.naderman.de"
+ },
+ {
+ "name": "Jordi Boggiano",
+ "email": "j.boggiano@seld.be",
+ "homepage": "http://seld.be"
+ },
+ {
+ "name": "Rob Bast",
+ "email": "rob.bast@gmail.com",
+ "homepage": "http://robbast.nl"
+ }
+ ],
+ "description": "Semver library that offers utilities, version constraint parsing and validation.",
+ "keywords": [
+ "semantic",
+ "semver",
+ "validation",
+ "versioning"
+ ],
+ "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-10-14T08:51:15+00:00"
+ },
+ {
+ "name": "composer/xdebug-handler",
+ "version": "1.4.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/composer/xdebug-handler.git",
+ "reference": "6e076a124f7ee146f2487554a94b6a19a74887ba"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6e076a124f7ee146f2487554a94b6a19a74887ba",
+ "reference": "6e076a124f7ee146f2487554a94b6a19a74887ba",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.3.2 || ^7.0 || ^8.0",
+ "psr/log": "^1.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Composer\\XdebugHandler\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "John Stevenson",
+ "email": "john-stevenson@blueyonder.co.uk"
+ }
+ ],
+ "description": "Restarts a process without Xdebug.",
+ "keywords": [
+ "Xdebug",
+ "performance"
+ ],
+ "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-10-24T12:39:10+00:00"
+ },
+ {
+ "name": "dnoegel/php-xdg-base-dir",
+ "version": "v0.1.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/dnoegel/php-xdg-base-dir.git",
+ "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd",
+ "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~7.0|~6.0|~5.0|~4.8.35"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "XdgBaseDir\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "implementation of xdg base directory specification for php",
+ "time": "2019-12-04T15:06:13+00:00"
},
{
"name": "doctrine/instantiator",
@@ -1767,6 +2107,99 @@
],
"time": "2020-06-15T18:51:04+00:00"
},
+ {
+ "name": "felixfbecker/advanced-json-rpc",
+ "version": "v3.1.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/felixfbecker/php-advanced-json-rpc.git",
+ "reference": "0ed363f8de17d284d479ec813c9ad3f6834b5c40"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/0ed363f8de17d284d479ec813c9ad3f6834b5c40",
+ "reference": "0ed363f8de17d284d479ec813c9ad3f6834b5c40",
+ "shasum": ""
+ },
+ "require": {
+ "netresearch/jsonmapper": "^1.0 || ^2.0",
+ "php": ">=7.0",
+ "phpdocumentor/reflection-docblock": "^4.0.0 || ^5.0.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^6.0.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "AdvancedJsonRpc\\": "lib/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "ISC"
+ ],
+ "authors": [
+ {
+ "name": "Felix Becker",
+ "email": "felix.b@outlook.com"
+ }
+ ],
+ "description": "A more advanced JSONRPC implementation",
+ "time": "2020-03-11T15:21:41+00:00"
+ },
+ {
+ "name": "felixfbecker/language-server-protocol",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/felixfbecker/php-language-server-protocol.git",
+ "reference": "85e83cacd2ed573238678c6875f8f0d7ec699541"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/85e83cacd2ed573238678c6875f8f0d7ec699541",
+ "reference": "85e83cacd2ed573238678c6875f8f0d7ec699541",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "*",
+ "squizlabs/php_codesniffer": "^3.1",
+ "vimeo/psalm": "^4.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "LanguageServerProtocol\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "ISC"
+ ],
+ "authors": [
+ {
+ "name": "Felix Becker",
+ "email": "felix.b@outlook.com"
+ }
+ ],
+ "description": "PHP classes for the Language Server Protocol",
+ "keywords": [
+ "language",
+ "microsoft",
+ "php",
+ "server"
+ ],
+ "time": "2020-10-23T13:55:30+00:00"
+ },
{
"name": "matthiasmullie/minify",
"version": "1.3.63",
@@ -1882,12 +2315,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": {
@@ -1928,7 +2361,53 @@
"type": "tidelift"
}
],
- "time": "2020-08-28T16:31:07+00:00"
+ "time": "2020-10-01T09:35:15+00:00"
+ },
+ {
+ "name": "netresearch/jsonmapper",
+ "version": "v2.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/cweiske/jsonmapper.git",
+ "reference": "e0f1e33a71587aca81be5cffbb9746510e1fe04e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/e0f1e33a71587aca81be5cffbb9746510e1fe04e",
+ "reference": "e0f1e33a71587aca81be5cffbb9746510e1fe04e",
+ "shasum": ""
+ },
+ "require": {
+ "ext-json": "*",
+ "ext-pcre": "*",
+ "ext-reflection": "*",
+ "ext-spl": "*",
+ "php": ">=5.6"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.8.35 || ~5.7 || ~6.4 || ~7.0",
+ "squizlabs/php_codesniffer": "~3.5"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "JsonMapper": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "OSL-3.0"
+ ],
+ "authors": [
+ {
+ "name": "Christian Weiske",
+ "email": "cweiske@cweiske.de",
+ "homepage": "http://github.com/cweiske/jsonmapper/",
+ "role": "Developer"
+ }
+ ],
+ "description": "Map nested JSON structures onto PHP classes",
+ "time": "2020-04-16T18:48:43+00:00"
},
{
"name": "nikic/php-parser",
@@ -1982,6 +2461,55 @@
],
"time": "2020-09-26T10:30:38+00:00"
},
+ {
+ "name": "openlss/lib-array2xml",
+ "version": "1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/nullivex/lib-array2xml.git",
+ "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/nullivex/lib-array2xml/zipball/a91f18a8dfc69ffabe5f9b068bc39bb202c81d90",
+ "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "LSS": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache-2.0"
+ ],
+ "authors": [
+ {
+ "name": "Bryan Tong",
+ "email": "bryan@nullivex.com",
+ "homepage": "https://www.nullivex.com"
+ },
+ {
+ "name": "Tony Butler",
+ "email": "spudz76@gmail.com",
+ "homepage": "https://www.nullivex.com"
+ }
+ ],
+ "description": "Array2XML conversion library credit to lalit.org",
+ "homepage": "https://www.nullivex.com",
+ "keywords": [
+ "array",
+ "array conversion",
+ "xml",
+ "xml conversion"
+ ],
+ "time": "2019-03-29T20:06:56+00:00"
+ },
{
"name": "phar-io/manifest",
"version": "dev-master",
@@ -2300,12 +2828,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "a6037d775070cc82732c21809664c63fb4f19916"
+ "reference": "ed363c3ce393560a1c300dce0298bbf0f0528b13"
},
"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/ed363c3ce393560a1c300dce0298bbf0f0528b13",
+ "reference": "ed363c3ce393560a1c300dce0298bbf0f0528b13",
"shasum": ""
},
"require": {
@@ -2365,7 +2893,7 @@
"type": "github"
}
],
- "time": "2020-09-27T04:42:46+00:00"
+ "time": "2020-10-26T15:46:21+00:00"
},
{
"name": "phpunit/php-file-iterator",
@@ -2373,12 +2901,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
- "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8"
+ "reference": "86daa943fbb765aa0129d16f84c5bf7aaec44582"
},
"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/86daa943fbb765aa0129d16f84c5bf7aaec44582",
+ "reference": "86daa943fbb765aa0129d16f84c5bf7aaec44582",
"shasum": ""
},
"require": {
@@ -2421,7 +2949,7 @@
"type": "github"
}
],
- "time": "2020-09-28T05:57:25+00:00"
+ "time": "2020-10-26T04:57:30+00:00"
},
{
"name": "phpunit/php-invoker",
@@ -2429,12 +2957,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-invoker.git",
- "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67"
+ "reference": "dd5300fef2ede06687642585706f912c073a0cc5"
},
"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/dd5300fef2ede06687642585706f912c073a0cc5",
+ "reference": "dd5300fef2ede06687642585706f912c073a0cc5",
"shasum": ""
},
"require": {
@@ -2480,7 +3008,7 @@
"type": "github"
}
],
- "time": "2020-09-28T05:58:55+00:00"
+ "time": "2020-10-26T04:57:38+00:00"
},
{
"name": "phpunit/php-text-template",
@@ -2488,12 +3016,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-text-template.git",
- "reference": "18c887016e60e52477e54534956d7b47bc52cd84"
+ "reference": "60c51e16ad53fc17844f6fd6e608e80d9743f320"
},
"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/60c51e16ad53fc17844f6fd6e608e80d9743f320",
+ "reference": "60c51e16ad53fc17844f6fd6e608e80d9743f320",
"shasum": ""
},
"require": {
@@ -2535,7 +3063,7 @@
"type": "github"
}
],
- "time": "2020-09-28T06:03:05+00:00"
+ "time": "2020-10-26T05:38:01+00:00"
},
{
"name": "phpunit/php-timer",
@@ -2543,12 +3071,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-timer.git",
- "reference": "c9ff14f493699e2f6adee9fd06a0245b276643b7"
+ "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2"
},
"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/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2",
+ "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2",
"shasum": ""
},
"require": {
@@ -2590,20 +3118,20 @@
"type": "github"
}
],
- "time": "2020-09-28T06:00:25+00:00"
+ "time": "2020-10-26T13:16:10+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": "d3b55c36f95329c062e69f6c10441106cf712f7f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f7316ea106df7c9507f4fdaa88c47bc10a3b27a1",
- "reference": "f7316ea106df7c9507f4fdaa88c47bc10a3b27a1",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d3b55c36f95329c062e69f6c10441106cf712f7f",
+ "reference": "d3b55c36f95329c062e69f6c10441106cf712f7f",
"shasum": ""
},
"require": {
@@ -2618,23 +3146,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": "*",
@@ -2650,7 +3178,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "9.3-dev"
+ "dev-master": "9.5-dev"
}
},
"autoload": {
@@ -2689,7 +3217,56 @@
"type": "github"
}
],
- "time": "2020-09-24T08:08:49+00:00"
+ "time": "2020-10-26T06:27:31+00:00"
+ },
+ {
+ "name": "psr/container",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/container.git",
+ "reference": "381524e8568e07f31d504a945b88556548c8c42e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/container/zipball/381524e8568e07f31d504a945b88556548c8c42e",
+ "reference": "381524e8568e07f31d504a945b88556548c8c42e",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Container\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "https://www.php-fig.org/"
+ }
+ ],
+ "description": "Common Container Interface (PHP FIG PSR-11)",
+ "homepage": "https://github.com/php-fig/container",
+ "keywords": [
+ "PSR-11",
+ "container",
+ "container-interface",
+ "container-interop",
+ "psr"
+ ],
+ "time": "2020-10-13T07:07:53+00:00"
},
{
"name": "sebastian/cli-parser",
@@ -2697,12 +3274,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/cli-parser.git",
- "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2"
+ "reference": "bb3529e836d10bd4d2713ae050a2c5251eb9ff3e"
},
"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/bb3529e836d10bd4d2713ae050a2c5251eb9ff3e",
+ "reference": "bb3529e836d10bd4d2713ae050a2c5251eb9ff3e",
"shasum": ""
},
"require": {
@@ -2741,7 +3318,7 @@
"type": "github"
}
],
- "time": "2020-09-28T06:08:49+00:00"
+ "time": "2020-10-26T04:58:42+00:00"
},
{
"name": "sebastian/code-unit",
@@ -2749,12 +3326,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit.git",
- "reference": "d3a241b6028ff9d8e97d2b6ebd4090d01f92fad8"
+ "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120"
},
"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/1fc9f64c0927627ef78ba436c9b17d967e68e120",
+ "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120",
"shasum": ""
},
"require": {
@@ -2793,7 +3370,7 @@
"type": "github"
}
],
- "time": "2020-09-28T05:28:46+00:00"
+ "time": "2020-10-26T13:08:54+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
@@ -2801,12 +3378,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
- "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5"
+ "reference": "aed227b805d6b8d279d05cee266b46f5512b8ea4"
},
"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/aed227b805d6b8d279d05cee266b46f5512b8ea4",
+ "reference": "aed227b805d6b8d279d05cee266b46f5512b8ea4",
"shasum": ""
},
"require": {
@@ -2844,7 +3421,7 @@
"type": "github"
}
],
- "time": "2020-09-28T05:30:19+00:00"
+ "time": "2020-10-26T04:56:19+00:00"
},
{
"name": "sebastian/comparator",
@@ -2852,12 +3429,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "7a8ff306445707539c1a6397372a982a1ec55120"
+ "reference": "55f4261989e546dc112258c7a75935a81a7ce382"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/7a8ff306445707539c1a6397372a982a1ec55120",
- "reference": "7a8ff306445707539c1a6397372a982a1ec55120",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382",
+ "reference": "55f4261989e546dc112258c7a75935a81a7ce382",
"shasum": ""
},
"require": {
@@ -2914,7 +3491,7 @@
"type": "github"
}
],
- "time": "2020-09-30T06:47:25+00:00"
+ "time": "2020-10-26T15:49:45+00:00"
},
{
"name": "sebastian/complexity",
@@ -2922,12 +3499,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/complexity.git",
- "reference": "ba8cc2da0c0bfbc813d03b56406734030c7f1eff"
+ "reference": "739b35e53379900cc9ac327b2147867b8b6efd88"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/ba8cc2da0c0bfbc813d03b56406734030c7f1eff",
- "reference": "ba8cc2da0c0bfbc813d03b56406734030c7f1eff",
+ "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88",
+ "reference": "739b35e53379900cc9ac327b2147867b8b6efd88",
"shasum": ""
},
"require": {
@@ -2967,7 +3544,7 @@
"type": "github"
}
],
- "time": "2020-09-28T06:05:03+00:00"
+ "time": "2020-10-26T15:52:27+00:00"
},
{
"name": "sebastian/diff",
@@ -2975,12 +3552,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "ffc949a1a2aae270ea064453d7535b82e4c32092"
+ "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ffc949a1a2aae270ea064453d7535b82e4c32092",
- "reference": "ffc949a1a2aae270ea064453d7535b82e4c32092",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d",
+ "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d",
"shasum": ""
},
"require": {
@@ -3029,7 +3606,7 @@
"type": "github"
}
],
- "time": "2020-09-28T05:32:55+00:00"
+ "time": "2020-10-26T13:10:38+00:00"
},
{
"name": "sebastian/environment",
@@ -3037,12 +3614,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "388b6ced16caa751030f6a69e588299fa09200ac"
+ "reference": "621594614bd6158ea0c1d6af09c6e5af01d8b1e8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac",
- "reference": "388b6ced16caa751030f6a69e588299fa09200ac",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/621594614bd6158ea0c1d6af09c6e5af01d8b1e8",
+ "reference": "621594614bd6158ea0c1d6af09c6e5af01d8b1e8",
"shasum": ""
},
"require": {
@@ -3088,7 +3665,7 @@
"type": "github"
}
],
- "time": "2020-09-28T05:52:38+00:00"
+ "time": "2020-10-26T04:56:46+00:00"
},
{
"name": "sebastian/exporter",
@@ -3096,12 +3673,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65"
+ "reference": "1c85999374d0f9e8c7c11ff1e93d0c75343eba8e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65",
- "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65",
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/1c85999374d0f9e8c7c11ff1e93d0c75343eba8e",
+ "reference": "1c85999374d0f9e8c7c11ff1e93d0c75343eba8e",
"shasum": ""
},
"require": {
@@ -3161,7 +3738,7 @@
"type": "github"
}
],
- "time": "2020-09-28T05:24:23+00:00"
+ "time": "2020-10-26T04:56:54+00:00"
},
{
"name": "sebastian/global-state",
@@ -3169,12 +3746,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
- "reference": "ea779cb749a478b22a2564ac41cd7bda79c78dc7"
+ "reference": "a90ccbddffa067b51f574dea6eb25d5680839455"
},
"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/a90ccbddffa067b51f574dea6eb25d5680839455",
+ "reference": "a90ccbddffa067b51f574dea6eb25d5680839455",
"shasum": ""
},
"require": {
@@ -3221,7 +3798,7 @@
"type": "github"
}
],
- "time": "2020-09-28T05:54:06+00:00"
+ "time": "2020-10-26T15:55:19+00:00"
},
{
"name": "sebastian/lines-of-code",
@@ -3229,12 +3806,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/lines-of-code.git",
- "reference": "6514b8f21906b8b46f520d1fbd17a4523fa59a54"
+ "reference": "acf76492a65401babcf5283296fa510782783a7a"
},
"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/acf76492a65401babcf5283296fa510782783a7a",
+ "reference": "acf76492a65401babcf5283296fa510782783a7a",
"shasum": ""
},
"require": {
@@ -3274,7 +3851,7 @@
"type": "github"
}
],
- "time": "2020-09-28T06:07:27+00:00"
+ "time": "2020-10-26T17:03:56+00:00"
},
{
"name": "sebastian/object-enumerator",
@@ -3282,12 +3859,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-enumerator.git",
- "reference": "f6f5957013d84725427d361507e13513702888a4"
+ "reference": "5c9eeac41b290a3712d88851518825ad78f45c71"
},
"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/5c9eeac41b290a3712d88851518825ad78f45c71",
+ "reference": "5c9eeac41b290a3712d88851518825ad78f45c71",
"shasum": ""
},
"require": {
@@ -3327,7 +3904,7 @@
"type": "github"
}
],
- "time": "2020-09-28T05:55:06+00:00"
+ "time": "2020-10-26T13:12:34+00:00"
},
{
"name": "sebastian/object-reflector",
@@ -3335,12 +3912,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-reflector.git",
- "reference": "d9d0ab3b12acb1768bc1e0a89b23c90d2043cbe5"
+ "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7"
},
"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/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7",
+ "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7",
"shasum": ""
},
"require": {
@@ -3378,7 +3955,7 @@
"type": "github"
}
],
- "time": "2020-09-28T05:56:16+00:00"
+ "time": "2020-10-26T13:14:26+00:00"
},
{
"name": "sebastian/recursion-context",
@@ -3386,12 +3963,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
- "reference": "7e70f3d32a3058d4ad5226c1371f2dd4677dc073"
+ "reference": "be9bb5ea038598dd67ac9d40c5c37205d73deff9"
},
"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/be9bb5ea038598dd67ac9d40c5c37205d73deff9",
+ "reference": "be9bb5ea038598dd67ac9d40c5c37205d73deff9",
"shasum": ""
},
"require": {
@@ -3437,7 +4014,7 @@
"type": "github"
}
],
- "time": "2020-09-28T05:27:00+00:00"
+ "time": "2020-10-26T13:20:23+00:00"
},
{
"name": "sebastian/resource-operations",
@@ -3496,12 +4073,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/type.git",
- "reference": "e494dcaeb89d1458c9ccd8c819745245a1669aea"
+ "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/e494dcaeb89d1458c9ccd8c819745245a1669aea",
- "reference": "e494dcaeb89d1458c9ccd8c819745245a1669aea",
+ "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/81cd61ab7bbf2de744aba0ea61fae32f721df3d2",
+ "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2",
"shasum": ""
},
"require": {
@@ -3513,7 +4090,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.2-dev"
+ "dev-master": "2.3-dev"
}
},
"autoload": {
@@ -3540,7 +4117,7 @@
"type": "github"
}
],
- "time": "2020-09-28T06:01:38+00:00"
+ "time": "2020-10-26T13:18:59+00:00"
},
{
"name": "sebastian/version",
@@ -3626,21 +4203,115 @@
"time": "2020-09-16T00:12:52+00:00"
},
{
- "name": "symfony/polyfill-ctype",
- "version": "dev-master",
+ "name": "symfony/console",
+ "version": "5.x-dev",
"source": {
"type": "git",
- "url": "https://github.com/symfony/polyfill-ctype.git",
- "reference": "1c302646f6efc070cd46856e600e5e0684d6b454"
+ "url": "https://github.com/symfony/console.git",
+ "reference": "4f00061f0fe49fb7c836fc31d66f365d8bff32fa"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454",
- "reference": "1c302646f6efc070cd46856e600e5e0684d6b454",
+ "url": "https://api.github.com/repos/symfony/console/zipball/4f00061f0fe49fb7c836fc31d66f365d8bff32fa",
+ "reference": "4f00061f0fe49fb7c836fc31d66f365d8bff32fa",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=7.2.5",
+ "symfony/polyfill-mbstring": "~1.0",
+ "symfony/polyfill-php73": "^1.8",
+ "symfony/polyfill-php80": "^1.15",
+ "symfony/service-contracts": "^1.1|^2",
+ "symfony/string": "^5.1"
+ },
+ "conflict": {
+ "symfony/dependency-injection": "<4.4",
+ "symfony/dotenv": "<5.1",
+ "symfony/event-dispatcher": "<4.4",
+ "symfony/lock": "<4.4",
+ "symfony/process": "<4.4"
+ },
+ "provide": {
+ "psr/log-implementation": "1.0"
+ },
+ "require-dev": {
+ "psr/log": "~1.0",
+ "symfony/config": "^4.4|^5.0",
+ "symfony/dependency-injection": "^4.4|^5.0",
+ "symfony/event-dispatcher": "^4.4|^5.0",
+ "symfony/lock": "^4.4|^5.0",
+ "symfony/process": "^4.4|^5.0",
+ "symfony/var-dumper": "^4.4|^5.0"
+ },
+ "suggest": {
+ "psr/log": "For using the console logger",
+ "symfony/event-dispatcher": "",
+ "symfony/lock": "",
+ "symfony/process": ""
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Console\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony Console Component",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "cli",
+ "command line",
+ "console",
+ "terminal"
+ ],
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-10-24T12:08:07+00:00"
+ },
+ {
+ "name": "symfony/polyfill-ctype",
+ "version": "dev-main",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-ctype.git",
+ "reference": "fade6deebd931cfd7a544f68479405a6a08979a3"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/fade6deebd931cfd7a544f68479405a6a08979a3",
+ "reference": "fade6deebd931cfd7a544f68479405a6a08979a3",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
},
"suggest": {
"ext-ctype": "For best performance"
@@ -3648,7 +4319,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.18-dev"
+ "dev-main": "1.21-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -3699,24 +4370,183 @@
"type": "tidelift"
}
],
- "time": "2020-07-14T12:35:20+00:00"
+ "time": "2020-10-26T13:35:45+00:00"
},
{
- "name": "symfony/polyfill-mbstring",
- "version": "dev-master",
+ "name": "symfony/polyfill-intl-grapheme",
+ "version": "dev-main",
"source": {
"type": "git",
- "url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "48928d471ede0548b399f54b0286fe0d0ed79267"
+ "url": "https://github.com/symfony/polyfill-intl-grapheme.git",
+ "reference": "ee2f954ea0f9ab61dad0170eddc919ee83bef327"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/48928d471ede0548b399f54b0286fe0d0ed79267",
- "reference": "48928d471ede0548b399f54b0286fe0d0ed79267",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/ee2f954ea0f9ab61dad0170eddc919ee83bef327",
+ "reference": "ee2f954ea0f9ab61dad0170eddc919ee83bef327",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=7.1"
+ },
+ "suggest": {
+ "ext-intl": "For best performance"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.21-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Intl\\Grapheme\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for intl's grapheme_* functions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "grapheme",
+ "intl",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-10-26T13:35:45+00:00"
+ },
+ {
+ "name": "symfony/polyfill-intl-normalizer",
+ "version": "dev-main",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-intl-normalizer.git",
+ "reference": "69609f9f06790591b4b13a45ee117e7bab6395aa"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/69609f9f06790591b4b13a45ee117e7bab6395aa",
+ "reference": "69609f9f06790591b4b13a45ee117e7bab6395aa",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "suggest": {
+ "ext-intl": "For best performance"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.21-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Intl\\Normalizer\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ],
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for intl's Normalizer class and related functions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "intl",
+ "normalizer",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-10-26T13:35:45+00:00"
+ },
+ {
+ "name": "symfony/polyfill-mbstring",
+ "version": "dev-main",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-mbstring.git",
+ "reference": "401c9d9d3400c53a8f1a39425f0543406c137a43"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/401c9d9d3400c53a8f1a39425f0543406c137a43",
+ "reference": "401c9d9d3400c53a8f1a39425f0543406c137a43",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
},
"suggest": {
"ext-mbstring": "For best performance"
@@ -3724,7 +4554,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.18-dev"
+ "dev-main": "1.21-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -3776,7 +4606,320 @@
"type": "tidelift"
}
],
- "time": "2020-09-14T11:01:58+00:00"
+ "time": "2020-10-26T13:35:45+00:00"
+ },
+ {
+ "name": "symfony/polyfill-php73",
+ "version": "dev-main",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php73.git",
+ "reference": "8c0d39c1526009b97f43beea4cc685bbc353a70b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/8c0d39c1526009b97f43beea4cc685bbc353a70b",
+ "reference": "8c0d39c1526009b97f43beea4cc685bbc353a70b",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.21-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Php73\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ],
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-10-26T13:35:45+00:00"
+ },
+ {
+ "name": "symfony/polyfill-php80",
+ "version": "dev-main",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php80.git",
+ "reference": "3a11f3dfb34ad50f978cb2b8cf936933b87739aa"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/3a11f3dfb34ad50f978cb2b8cf936933b87739aa",
+ "reference": "3a11f3dfb34ad50f978cb2b8cf936933b87739aa",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.21-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Php80\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ],
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Ion Bazan",
+ "email": "ion.bazan@gmail.com"
+ },
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-10-26T13:35:45+00:00"
+ },
+ {
+ "name": "symfony/service-contracts",
+ "version": "dev-main",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/service-contracts.git",
+ "reference": "0aeee2f70f4550e6c48c9a796d98f5ceda58dfda"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/service-contracts/zipball/0aeee2f70f4550e6c48c9a796d98f5ceda58dfda",
+ "reference": "0aeee2f70f4550e6c48c9a796d98f5ceda58dfda",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "psr/container": "^1.0"
+ },
+ "suggest": {
+ "symfony/service-implementation": ""
+ },
+ "type": "library",
+ "extra": {
+ "branch-version": "2.3",
+ "branch-alias": {
+ "dev-main": "2.3-dev"
+ },
+ "thanks": {
+ "name": "symfony/contracts",
+ "url": "https://github.com/symfony/contracts"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Contracts\\Service\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Generic abstractions related to writing services",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "abstractions",
+ "contracts",
+ "decoupling",
+ "interfaces",
+ "interoperability",
+ "standards"
+ ],
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-10-14T17:08:19+00:00"
+ },
+ {
+ "name": "symfony/string",
+ "version": "5.x-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/string.git",
+ "reference": "40e975edadd4e32cd16f3753b3bad65d9ac48242"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/string/zipball/40e975edadd4e32cd16f3753b3bad65d9ac48242",
+ "reference": "40e975edadd4e32cd16f3753b3bad65d9ac48242",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/polyfill-ctype": "~1.8",
+ "symfony/polyfill-intl-grapheme": "~1.0",
+ "symfony/polyfill-intl-normalizer": "~1.0",
+ "symfony/polyfill-mbstring": "~1.0",
+ "symfony/polyfill-php80": "~1.15"
+ },
+ "require-dev": {
+ "symfony/error-handler": "^4.4|^5.0",
+ "symfony/http-client": "^4.4|^5.0",
+ "symfony/translation-contracts": "^1.1|^2",
+ "symfony/var-exporter": "^4.4|^5.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\String\\": ""
+ },
+ "files": [
+ "Resources/functions.php"
+ ],
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony String component",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "grapheme",
+ "i18n",
+ "string",
+ "unicode",
+ "utf-8",
+ "utf8"
+ ],
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-10-24T12:08:07+00:00"
},
{
"name": "theseer/tokenizer",
@@ -3830,16 +4973,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"
},
@@ -3897,7 +5040,108 @@
"type": "tidelift"
}
],
- "time": "2020-09-27T05:01:29+00:00"
+ "time": "2020-10-21T12:45:52+00:00"
+ },
+ {
+ "name": "vimeo/psalm",
+ "version": "4.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/vimeo/psalm.git",
+ "reference": "b1e2e30026936ef8d5bf6a354d1c3959b6231f44"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/vimeo/psalm/zipball/b1e2e30026936ef8d5bf6a354d1c3959b6231f44",
+ "reference": "b1e2e30026936ef8d5bf6a354d1c3959b6231f44",
+ "shasum": ""
+ },
+ "require": {
+ "amphp/amp": "^2.1",
+ "amphp/byte-stream": "^1.5",
+ "composer/package-versions-deprecated": "^1.8.0",
+ "composer/semver": "^1.4 || ^2.0 || ^3.0",
+ "composer/xdebug-handler": "^1.1",
+ "dnoegel/php-xdg-base-dir": "^0.1.1",
+ "ext-dom": "*",
+ "ext-json": "*",
+ "ext-libxml": "*",
+ "ext-mbstring": "*",
+ "ext-simplexml": "*",
+ "ext-tokenizer": "*",
+ "felixfbecker/advanced-json-rpc": "^3.0.3",
+ "felixfbecker/language-server-protocol": "^1.4",
+ "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0",
+ "nikic/php-parser": "^4.10.1",
+ "openlss/lib-array2xml": "^1.0",
+ "php": "^7.3|^8",
+ "sebastian/diff": "^3.0 || ^4.0",
+ "symfony/console": "^3.4.17 || ^4.1.6 || ^5.0",
+ "webmozart/glob": "^4.1",
+ "webmozart/path-util": "^2.3"
+ },
+ "provide": {
+ "psalm/psalm": "self.version"
+ },
+ "require-dev": {
+ "amphp/amp": "^2.4.2",
+ "bamarni/composer-bin-plugin": "^1.2",
+ "brianium/paratest": "^4.0.0",
+ "ext-curl": "*",
+ "phpdocumentor/reflection-docblock": "^5",
+ "phpmyadmin/sql-parser": "5.1.0",
+ "phpspec/prophecy": ">=1.9.0",
+ "phpunit/phpunit": "^9.0",
+ "psalm/plugin-phpunit": "^0.13",
+ "slevomat/coding-standard": "^5.0",
+ "squizlabs/php_codesniffer": "^3.5",
+ "symfony/process": "^4.3",
+ "weirdan/prophecy-shim": "^1.0 || ^2.0"
+ },
+ "suggest": {
+ "ext-igbinary": "^2.0.5"
+ },
+ "bin": [
+ "psalm",
+ "psalm-language-server",
+ "psalm-plugin",
+ "psalm-refactor",
+ "psalter"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.x-dev",
+ "dev-3.x": "3.x-dev",
+ "dev-2.x": "2.x-dev",
+ "dev-1.x": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psalm\\": "src/Psalm/"
+ },
+ "files": [
+ "src/functions.php",
+ "src/spl_object_id.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Matthew Brown"
+ }
+ ],
+ "description": "A static analysis tool for finding errors in PHP applications",
+ "keywords": [
+ "code",
+ "inspection",
+ "php"
+ ],
+ "time": "2020-10-20T13:40:17+00:00"
},
{
"name": "webmozart/assert",
@@ -3947,6 +5191,99 @@
"validate"
],
"time": "2020-07-08T17:02:28+00:00"
+ },
+ {
+ "name": "webmozart/glob",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/webmozart/glob.git",
+ "reference": "8da14867b709e8776d9f6272faaf844aefc695e3"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/webmozart/glob/zipball/8da14867b709e8776d9f6272faaf844aefc695e3",
+ "reference": "8da14867b709e8776d9f6272faaf844aefc695e3",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.3.3|^7.0",
+ "webmozart/path-util": "^2.2"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.6",
+ "sebastian/version": "^1.0.1",
+ "symfony/filesystem": "^2.5"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.1-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Webmozart\\Glob\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Bernhard Schussek",
+ "email": "bschussek@gmail.com"
+ }
+ ],
+ "description": "A PHP implementation of Ant's glob.",
+ "time": "2016-08-15T15:31:26+00:00"
+ },
+ {
+ "name": "webmozart/path-util",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/webmozart/path-util.git",
+ "reference": "95a8f7ad150c2a3773ff3c3d04f557a24c99cfd2"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/webmozart/path-util/zipball/95a8f7ad150c2a3773ff3c3d04f557a24c99cfd2",
+ "reference": "95a8f7ad150c2a3773ff3c3d04f557a24c99cfd2",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.3.3|^7.0",
+ "webmozart/assert": "~1.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.6",
+ "sebastian/version": "^1.0.1"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.3-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Webmozart\\PathUtil\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Bernhard Schussek",
+ "email": "bschussek@gmail.com"
+ }
+ ],
+ "description": "A robust cross-platform utility for normalizing, comparing and modifying file paths.",
+ "time": "2016-08-15T15:31:42+00:00"
}
],
"aliases": [],
@@ -3963,6 +5300,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 ba79f4e4d7..5cca223fb9 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 b9cb6ddf9b..aa3b27865a 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -52,6 +52,7 @@ services:
- appwrite-certificates:/storage/certificates:rw
- appwrite-functions:/storage/functions:rw
- ./phpunit.xml:/usr/src/code/phpunit.xml
+ - ./psalm.xml:/usr/src/code/psalm.xml
- ./tests:/usr/src/code/tests
- ./app:/usr/src/code/app
# - ./vendor:/usr/src/code/vendor
@@ -266,6 +267,9 @@ services:
- _APP_REDIS_PORT
- _APP_SMTP_HOST
- _APP_SMTP_PORT
+ - _APP_SMTP_SECURE
+ - _APP_SMTP_USERNAME
+ - _APP_SMTP_PASSWORD
appwrite-schedule:
entrypoint: schedule
@@ -293,10 +297,10 @@ services:
ports:
- "3306:3306"
environment:
- - MYSQL_ROOT_PASSWORD=rootsecretpassword
- - MYSQL_DATABASE=appwrite
- - MYSQL_USER=user
- - MYSQL_PASSWORD=password
+ - MYSQL_ROOT_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
diff --git a/docs/references/account/create-session-oauth2.md b/docs/references/account/create-session-oauth2.md
index 459b62dc4a..fb6fa41b27 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 f166b0bc9f..03218ac6a9 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 54e0bf77be..3e6abf6a77 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 a1f54f4677..3b1aab75cd 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 d1393d5f64..d38520f479 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 4184532fd9..e0ca6d29ac 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 2545821205..00067751f7 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 e2c884a3e7..6302e3bf30 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 ad6e44f765..ae2da76774 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 5e1c07dabc..5d46cac1f2 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 1987171324..7de4c95e49 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 2cbe4feecf..2ed69d0ef4 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/psalm.xml b/psalm.xml
new file mode 100644
index 0000000000..30258a7095
--- /dev/null
+++ b/psalm.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
diff --git a/public/images/oauth2/wordpress.png b/public/images/oauth2/wordpress.png
new file mode 100644
index 0000000000..f1d664ada1
Binary files /dev/null and b/public/images/oauth2/wordpress.png differ
diff --git a/public/index.php b/public/index.php
index 01f9dbb117..4b08fcc704 100644
--- a/public/index.php
+++ b/public/index.php
@@ -22,6 +22,6 @@ error_reporting(E_ALL);
include __DIR__ . '/../app/controllers/general.php';
-$app = new App('Asia/Tel_Aviv');
+$app = new App('America/New_York');
$app->run(new Request(), new Response());
diff --git a/src/Appwrite/Auth/Auth.php b/src/Appwrite/Auth/Auth.php
index 634b456c72..0aebac7c51 100644
--- a/src/Appwrite/Auth/Auth.php
+++ b/src/Appwrite/Auth/Auth.php
@@ -118,7 +118,7 @@ class Auth
*
* @return string
*/
- public static function hash($string)
+ public static function hash(string $string)
{
return \hash('sha256', $string);
}
@@ -130,7 +130,7 @@ class Auth
*
* @param $string
*
- * @return bool|string
+ * @return bool|string|null
*/
public static function passwordHash($string)
{
@@ -193,14 +193,14 @@ class Auth
*/
public static function tokenVerify(array $tokens, int $type, string $secret)
{
- foreach ($tokens as $token) { /* @var $token Document */
- if (isset($token['type']) &&
- isset($token['secret']) &&
- isset($token['expire']) &&
- $token['type'] == $type &&
- $token['secret'] === self::hash($secret) &&
- $token['expire'] >= \time()) {
- return $token->getId();
+ foreach ($tokens as $token) { /** @var Document $token */
+ if ($token->isSet('type') &&
+ $token->isSet('secret') &&
+ $token->isSet('expire') &&
+ $token->getAttribute('type') == $type &&
+ $token->getAttribute('secret') === self::hash($secret) &&
+ $token->getAttribute('expire') >= \time()) {
+ return (string)$token->getId();
}
}
diff --git a/src/Appwrite/Auth/OAuth2.php b/src/Appwrite/Auth/OAuth2.php
index 5a92049fce..afc887802b 100644
--- a/src/Appwrite/Auth/OAuth2.php
+++ b/src/Appwrite/Auth/OAuth2.php
@@ -20,7 +20,7 @@ abstract class OAuth2
protected $callback;
/**
- * @var string
+ * @var array
*/
protected $state;
@@ -38,7 +38,7 @@ abstract class OAuth2
* @param array $state
* @param array $scopes
*/
- public function __construct(string $appId, string $appSecret, string $callback, $state = [], $scopes = [])
+ public function __construct(string $appId, string $appSecret, string $callback, array $state = [], array $scopes = [])
{
$this->appID = $appId;
$this->appSecret = $appSecret;
@@ -116,7 +116,7 @@ abstract class OAuth2
/**
* @param $state
*
- * @return string
+ * @return array
*/
public function parseState(string $state)
{
@@ -152,6 +152,6 @@ abstract class OAuth2
\curl_close($ch);
- return $response;
+ return (string)$response;
}
}
diff --git a/src/Appwrite/Auth/OAuth2/Amazon.php b/src/Appwrite/Auth/OAuth2/Amazon.php
index eb7433c1c1..de5dde8e48 100644
--- a/src/Appwrite/Auth/OAuth2/Amazon.php
+++ b/src/Appwrite/Auth/OAuth2/Amazon.php
@@ -34,7 +34,7 @@ class Amazon extends OAuth2
/**
* @param $state
*
- * @return json
+ * @return array
*/
public function parseState(string $state)
{
@@ -63,7 +63,7 @@ class Amazon extends OAuth2
*/
public function getAccessToken(string $code): string
{
- $headers[] = 'Content-Type: application/x-www-form-urlencoded;charset=UTF-8';
+ $headers = ['Content-Type: application/x-www-form-urlencoded;charset=UTF-8'];
$accessToken = $this->request(
'POST',
'https://api.amazon.com/auth/o2/token',
@@ -76,6 +76,7 @@ class Amazon extends OAuth2
'grant_type' => 'authorization_code'
])
);
+
$accessToken = \json_decode($accessToken, true);
if (isset($accessToken['access_token'])) {
diff --git a/src/Appwrite/Auth/OAuth2/Apple.php b/src/Appwrite/Auth/OAuth2/Apple.php
index 11a0b0c694..b0ecbd82f3 100644
--- a/src/Appwrite/Auth/OAuth2/Apple.php
+++ b/src/Appwrite/Auth/OAuth2/Apple.php
@@ -58,7 +58,7 @@ class Apple extends OAuth2
*/
public function getAccessToken(string $code): string
{
- $headers[] = 'Content-Type: application/x-www-form-urlencoded';
+ $headers = ['Content-Type: application/x-www-form-urlencoded'];
$accessToken = $this->request(
'POST',
'https://appleid.apple.com/auth/token',
@@ -175,8 +175,10 @@ class Apple extends OAuth2
/**
* @param string $data
+ *
+ * @return string
*/
- protected function encode($data)
+ protected function encode($data): string
{
return \str_replace(['+', '/', '='], ['-', '_', ''], \base64_encode($data));
}
diff --git a/src/Appwrite/Auth/OAuth2/Bitbucket.php b/src/Appwrite/Auth/OAuth2/Bitbucket.php
index ff867cbe64..651aed7f87 100644
--- a/src/Appwrite/Auth/OAuth2/Bitbucket.php
+++ b/src/Appwrite/Auth/OAuth2/Bitbucket.php
@@ -48,7 +48,7 @@ class Bitbucket extends OAuth2
public function getAccessToken(string $code): string
{
// Required as per Bitbucket Spec.
- $headers[] = 'Content-Type: application/x-www-form-urlencoded';
+ $headers = ['Content-Type: application/x-www-form-urlencoded'];
$accessToken = $this->request(
'POST',
diff --git a/src/Appwrite/Auth/OAuth2/Discord.php b/src/Appwrite/Auth/OAuth2/Discord.php
index 36bc102ca1..f28c2a8ddf 100644
--- a/src/Appwrite/Auth/OAuth2/Discord.php
+++ b/src/Appwrite/Auth/OAuth2/Discord.php
@@ -69,7 +69,7 @@ class Discord extends OAuth2
'redirect_uri' => $this->callback,
'client_id' => $this->appID,
'client_secret' => $this->appSecret,
- 'scope' => \implode(' ', $this->scope)
+ 'scope' => \implode(' ', $this->getScopes())
])
);
diff --git a/src/Appwrite/Auth/OAuth2/Dropbox.php b/src/Appwrite/Auth/OAuth2/Dropbox.php
index 85567c77ec..31503d1bc9 100644
--- a/src/Appwrite/Auth/OAuth2/Dropbox.php
+++ b/src/Appwrite/Auth/OAuth2/Dropbox.php
@@ -48,7 +48,7 @@ class Dropbox extends OAuth2
*/
public function getAccessToken(string $code): string
{
- $headers[] = 'Content-Type: application/x-www-form-urlencoded';
+ $headers = ['Content-Type: application/x-www-form-urlencoded'];
$accessToken = $this->request(
'POST',
'https://api.dropboxapi.com/oauth2/token',
@@ -127,7 +127,7 @@ class Dropbox extends OAuth2
protected function getUser(string $accessToken): array
{
if (empty($this->user)) {
- $headers[] = 'Authorization: Bearer '. \urlencode($accessToken);
+ $headers = ['Authorization: Bearer '. \urlencode($accessToken)];
$user = $this->request('POST', 'https://api.dropboxapi.com/2/users/get_current_account', $headers);
$this->user = \json_decode($user, true);
}
diff --git a/src/Appwrite/Auth/OAuth2/Microsoft.php b/src/Appwrite/Auth/OAuth2/Microsoft.php
index 349446ead3..902719ef8d 100644
--- a/src/Appwrite/Auth/OAuth2/Microsoft.php
+++ b/src/Appwrite/Auth/OAuth2/Microsoft.php
@@ -53,7 +53,7 @@ class Microsoft extends OAuth2
*/
public function getAccessToken(string $code): string
{
- $headers[] = 'Content-Type: application/x-www-form-urlencoded';
+ $headers = ['Content-Type: application/x-www-form-urlencoded'];
$accessToken = $this->request(
'POST',
@@ -134,7 +134,7 @@ class Microsoft extends OAuth2
protected function getUser(string $accessToken): array
{
if (empty($this->user)) {
- $headers[] = 'Authorization: Bearer '. \urlencode($accessToken);
+ $headers = ['Authorization: Bearer '. \urlencode($accessToken)];
$user = $this->request('GET', 'https://graph.microsoft.com/v1.0/me', $headers);
$this->user = \json_decode($user, true);
}
diff --git a/src/Appwrite/Auth/OAuth2/Paypal.php b/src/Appwrite/Auth/OAuth2/Paypal.php
index f7e143c5df..7f431d2277 100644
--- a/src/Appwrite/Auth/OAuth2/Paypal.php
+++ b/src/Appwrite/Auth/OAuth2/Paypal.php
@@ -10,18 +10,24 @@ use Appwrite\Auth\OAuth2;
class Paypal extends OAuth2
{
/**
- * @var string
+ * @var array
*/
- private $endpoint= [
+ private $endpoint = [
'sandbox' => 'https://www.sandbox.paypal.com/',
'live' => 'https://www.paypal.com/',
];
+ /**
+ * @var array
+ */
private $resourceEndpoint = [
'sandbox' => 'https://api.sandbox.paypal.com/v1/',
'live' => 'https://api.paypal.com/v1/',
];
+ /**
+ * @var string
+ */
protected $environment = 'live';
/**
@@ -29,11 +35,13 @@ class Paypal extends OAuth2
*/
protected $user = [];
-
+ /**
+ * @var array
+ */
protected $scopes = [
- 'openid',
- 'profile',
- 'email'
+ 'openid',
+ 'profile',
+ 'email'
];
/**
diff --git a/src/Appwrite/Auth/OAuth2/Salesforce.php b/src/Appwrite/Auth/OAuth2/Salesforce.php
index 7e6467d339..76256e0106 100644
--- a/src/Appwrite/Auth/OAuth2/Salesforce.php
+++ b/src/Appwrite/Auth/OAuth2/Salesforce.php
@@ -34,7 +34,7 @@ class Salesforce extends OAuth2
/**
* @param $state
*
- * @return json
+ * @return array
*/
public function parseState(string $state)
{
diff --git a/src/Appwrite/Auth/OAuth2/Vk.php b/src/Appwrite/Auth/OAuth2/Vk.php
index 11e1fd4f0d..bd1d59dadc 100644
--- a/src/Appwrite/Auth/OAuth2/Vk.php
+++ b/src/Appwrite/Auth/OAuth2/Vk.php
@@ -61,7 +61,7 @@ class Vk extends OAuth2
*/
public function getAccessToken(string $code): string
{
- $headers[] = 'Content-Type: application/x-www-form-urlencoded;charset=UTF-8';
+ $headers = ['Content-Type: application/x-www-form-urlencoded;charset=UTF-8'];
$accessToken = $this->request(
'POST',
'https://oauth.vk.com/access_token?',
diff --git a/src/Appwrite/Auth/OAuth2/WordPress.php b/src/Appwrite/Auth/OAuth2/WordPress.php
new file mode 100644
index 0000000000..a83953405e
--- /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/Auth/OAuth2/Yahoo.php b/src/Appwrite/Auth/OAuth2/Yahoo.php
index 8593c41ce8..1702e69686 100644
--- a/src/Appwrite/Auth/OAuth2/Yahoo.php
+++ b/src/Appwrite/Auth/OAuth2/Yahoo.php
@@ -45,7 +45,7 @@ class Yahoo extends OAuth2
/**
* @param $state
*
- * @return json
+ * @return array
*/
public function parseState(string $state)
{
diff --git a/src/Appwrite/Auth/OAuth2/Yandex.php b/src/Appwrite/Auth/OAuth2/Yandex.php
index 7955d33fd8..e6b94677d2 100644
--- a/src/Appwrite/Auth/OAuth2/Yandex.php
+++ b/src/Appwrite/Auth/OAuth2/Yandex.php
@@ -32,7 +32,7 @@ class Yandex extends OAuth2
/**
* @param $state
*
- * @return json
+ * @return array
*/
public function parseState(string $state)
{
diff --git a/src/Appwrite/Database/Adapter.php b/src/Appwrite/Database/Adapter.php
index 4dc7152571..6e14365f82 100644
--- a/src/Appwrite/Database/Adapter.php
+++ b/src/Appwrite/Database/Adapter.php
@@ -54,7 +54,7 @@ abstract class Adapter
/**
* Get Document.
*
- * @param int $id
+ * @param string $id
*
* @return array
*/
@@ -82,11 +82,11 @@ abstract class Adapter
/**
* Delete Node.
*
- * @param int $id
+ * @param string $id
*
* @return array
*/
- abstract public function deleteDocument($id);
+ abstract public function deleteDocument(string $id);
/**
* Delete Unique Key.
diff --git a/src/Appwrite/Database/Adapter/MySQL.php b/src/Appwrite/Database/Adapter/MySQL.php
index dffa39b7bf..d361433df0 100644
--- a/src/Appwrite/Database/Adapter/MySQL.php
+++ b/src/Appwrite/Database/Adapter/MySQL.php
@@ -139,7 +139,7 @@ class MySQL extends Adapter
{
$order = 0;
$data = \array_merge(['$id' => null, '$permissions' => []], $data); // Merge data with default params
- $signature = \md5(\json_encode($data, true));
+ $signature = \md5(\json_encode($data));
$revision = \uniqid('', true);
$data['$id'] = (empty($data['$id'])) ? null : $data['$id'];
@@ -232,6 +232,10 @@ class MySQL extends Adapter
// Handle array of relations
if (self::DATA_TYPE_ARRAY === $type) {
+ if(!is_array($value)) { // Property should be of type array, if not = skip
+ continue;
+ }
+
foreach ($value as $i => $child) {
if (self::DATA_TYPE_DICTIONARY !== $this->getDataType($child)) { // not dictionary
@@ -315,13 +319,13 @@ class MySQL extends Adapter
/**
* Delete Document.
*
- * @param int $id
+ * @param string $id
*
* @return array
*
* @throws Exception
*/
- public function deleteDocument($id)
+ public function deleteDocument(string $id)
{
$st1 = $this->getPDO()->prepare('DELETE FROM `'.$this->getNamespace().'.database.documents`
WHERE uid = :id
@@ -763,8 +767,10 @@ class MySQL extends Adapter
/**
* Get Unique Document ID.
+ *
+ * @return string
*/
- public function getId()
+ public function getId(): string
{
$unique = \uniqid();
$attempts = 5;
@@ -882,12 +888,12 @@ class MySQL extends Adapter
}
/**
- * @param $key
- * @param $value
+ * @param string $key
+ * @param mixed $value
*
* @return $this
*/
- public function setDebug($key, $value)
+ public function setDebug(string $key, $value): self
{
$this->debug[$key] = $value;
@@ -897,15 +903,17 @@ class MySQL extends Adapter
/**
* @return array
*/
- public function getDebug()
+ public function getDebug(): array
{
return $this->debug;
}
/**
* return $this;.
+ *
+ * @return void
*/
- public function resetDebug()
+ public function resetDebug(): void
{
$this->debug = [];
}
@@ -915,7 +923,7 @@ class MySQL extends Adapter
*
* @throws Exception
*/
- protected function getPDO()
+ protected function getPDO(): PDO
{
return $this->register->get('db');
}
@@ -925,7 +933,7 @@ class MySQL extends Adapter
*
* @return Client
*/
- protected function getRedis():Client
+ protected function getRedis(): Client
{
return $this->register->get('cache');
}
diff --git a/src/Appwrite/Database/Adapter/Redis.php b/src/Appwrite/Database/Adapter/Redis.php
index 7fe6ee0689..a1e440112d 100644
--- a/src/Appwrite/Database/Adapter/Redis.php
+++ b/src/Appwrite/Database/Adapter/Redis.php
@@ -137,13 +137,13 @@ class Redis extends Adapter
/**
* Delete Document.
*
- * @param $id
+ * @param string $id
*
* @return array
*
* @throws Exception
*/
- public function deleteDocument($id)
+ public function deleteDocument(string $id)
{
$data = $this->adapter->deleteDocument($id);
@@ -243,7 +243,7 @@ class Redis extends Adapter
*/
public function lastModified()
{
- return;
+ return 0;
}
/**
@@ -259,7 +259,7 @@ class Redis extends Adapter
*
* @return Client
*/
- protected function getRedis():Client
+ protected function getRedis(): Client
{
return $this->register->get('cache');
}
diff --git a/src/Appwrite/Database/Database.php b/src/Appwrite/Database/Database.php
index 4c62307b07..70725a89df 100644
--- a/src/Appwrite/Database/Database.php
+++ b/src/Appwrite/Database/Database.php
@@ -116,7 +116,7 @@ class Database
/**
* Create Namespace.
*
- * @param int $namespace
+ * @param string $namespace
*
* @return bool
*/
@@ -128,7 +128,7 @@ class Database
/**
* Delete Namespace.
*
- * @param int $namespace
+ * @param string $namespace
*
* @return bool
*/
@@ -187,22 +187,23 @@ class Database
}
/**
- * @param int $id
+ * @param string $id
* @param bool $mock is mocked data allowed?
+ * @param bool $decode enable decoding?
*
* @return Document
*/
- public function getDocument($id, $mock = true, $decode = true)
+ public function getDocument($id, bool $mock = true, bool $decode = true)
{
if (\is_null($id)) {
- return new Document([]);
+ return new Document();
}
$document = new Document((isset($this->mocks[$id]) && $mock) ? $this->mocks[$id] : $this->adapter->getDocument($id));
$validator = new Authorization($document, 'read');
if (!$validator->isValid($document->getPermissions())) { // Check if user has read access to this document
- return new Document([]);
+ return new Document();
}
$document = ($decode) ? $this->decode($document) : $document;
@@ -326,13 +327,13 @@ class Database
}
/**
- * @param int $id
+ * @param string $id
*
* @return Document|false
*
* @throws AuthorizationException
*/
- public function deleteDocument($id)
+ public function deleteDocument(string $id)
{
$document = $this->getDocument($id);
@@ -395,9 +396,9 @@ class Database
* @param string $key
* @param string $value
*
- * @return array
+ * @return self
*/
- public function setMock($key, $value)
+ public function setMock($key, $value): self
{
$this->mocks[$key] = $value;
@@ -405,11 +406,11 @@ class Database
}
/**
- * @param string $mocks
+ * @param array $mocks
*
- * @return array
+ * @return self
*/
- public function setMocks(array $mocks)
+ public function setMocks(array $mocks): self
{
$this->mocks = $mocks;
@@ -426,14 +427,14 @@ class Database
/**
* Add Attribute Filter
- *
+ *
* @param string $name
* @param callable $encode
* @param callable $decode
- *
- * return $this
+ *
+ * @return void
*/
- static public function addFilter(string $name, callable $encode, callable $decode)
+ static public function addFilter(string $name, callable $encode, callable $decode): void
{
self::$filters[$name] = [
'encode' => $encode,
diff --git a/src/Appwrite/Database/Document.php b/src/Appwrite/Database/Document.php
index 2c0ad4131d..2a472b839a 100644
--- a/src/Appwrite/Database/Document.php
+++ b/src/Appwrite/Database/Document.php
@@ -17,11 +17,11 @@ class Document extends ArrayObject
*
* @see ArrayObject::__construct
*
- * @param null $input
+ * @param array $input
* @param int $flags
* @param string $iterator_class
*/
- public function __construct($input = null, $flags = 0, $iterator_class = 'ArrayIterator')
+ public function __construct($input = [], $flags = 0, $iterator_class = 'ArrayIterator')
{
foreach ($input as $key => &$value) {
if (\is_array($value)) {
@@ -49,7 +49,7 @@ class Document extends ArrayObject
}
/**
- * @return int|null
+ * @return string
*/
public function getCollection()
{
@@ -196,8 +196,8 @@ class Document extends ArrayObject
/**
* Checks if a document key is set.
*
- * @param $key
- *
+ * @param string $key
+ *
* @return bool
*/
public function isSet($key)
diff --git a/src/Appwrite/Database/Validator/Authorization.php b/src/Appwrite/Database/Validator/Authorization.php
index 2938a3796b..03fd40a306 100644
--- a/src/Appwrite/Database/Validator/Authorization.php
+++ b/src/Appwrite/Database/Validator/Authorization.php
@@ -15,7 +15,7 @@ class Authorization extends Validator
/**
* @var Document
*/
- protected $document = null;
+ protected $document;
/**
* @var string
@@ -56,7 +56,7 @@ class Authorization extends Validator
*
* Returns true if valid or false if not.
*
- * @param array $permissions
+ * @param mixed $permissions
*
* @return bool
*/
@@ -89,8 +89,10 @@ class Authorization extends Validator
/**
* @param string $role
+ *
+ * @return void
*/
- public static function setRole($role)
+ public static function setRole($role): void
{
self::$roles[] = $role;
}
@@ -120,33 +122,41 @@ class Authorization extends Validator
* Change default status.
* This will be used for the
* value set on the self::reset() method
+ *
+ * @return void
*/
- public static function setDefaultStatus($status)
+ public static function setDefaultStatus($status): void
{
self::$statusDefault = $status;
self::$status = $status;
}
/**
- * Enable Authorization checks
+ * Enable Authorization checks
+ *
+ * @return void
*/
- public static function enable()
+ public static function enable(): void
{
self::$status = true;
}
/**
* Disable Authorization checks
+ *
+ * @return void
*/
- public static function disable()
+ public static function disable(): void
{
self::$status = false;
}
/**
* Disable Authorization checks
+ *
+ * @return void
*/
- public static function reset()
+ public static function reset(): void
{
self::$status = self::$statusDefault;
}
diff --git a/src/Appwrite/Database/Validator/Collection.php b/src/Appwrite/Database/Validator/Collection.php
index 5f8c81dc8f..4941a777e5 100644
--- a/src/Appwrite/Database/Validator/Collection.php
+++ b/src/Appwrite/Database/Validator/Collection.php
@@ -31,7 +31,11 @@ class Collection extends Structure
}
/**
- * @param Document $document
+ * Is valid.
+ *
+ * Returns true if valid or false if not.
+ *
+ * @param mixed $document
*
* @return bool
*/
diff --git a/src/Appwrite/Database/Validator/DocumentId.php b/src/Appwrite/Database/Validator/DocumentId.php
index 56041dc34b..ecfdcc5624 100644
--- a/src/Appwrite/Database/Validator/DocumentId.php
+++ b/src/Appwrite/Database/Validator/DocumentId.php
@@ -16,7 +16,7 @@ class DocumentId extends Validator
/**
* @var Database
*/
- protected $database = null;
+ protected $database;
/**
* @var string
diff --git a/src/Appwrite/Database/Validator/Permissions.php b/src/Appwrite/Database/Validator/Permissions.php
index 553d8ff2a4..4db82d9b0d 100644
--- a/src/Appwrite/Database/Validator/Permissions.php
+++ b/src/Appwrite/Database/Validator/Permissions.php
@@ -15,7 +15,7 @@ class Permissions extends Validator
/**
* @var Document
*/
- protected $document = null;
+ protected $document;
/**
* Structure constructor.
@@ -44,7 +44,7 @@ class Permissions extends Validator
*
* Returns true if valid or false if not.
*
- * @param array $value
+ * @param mixed $value
*
* @return bool
*/
diff --git a/src/Appwrite/Database/Validator/Structure.php b/src/Appwrite/Database/Validator/Structure.php
index 3a18c42762..34d885039e 100644
--- a/src/Appwrite/Database/Validator/Structure.php
+++ b/src/Appwrite/Database/Validator/Structure.php
@@ -29,9 +29,9 @@ class Structure extends Validator
protected $database;
/**
- * @var int
+ * @var string
*/
- protected $id = null;
+ protected $id = '';
/**
* Basic rules to apply on all documents.
@@ -118,7 +118,7 @@ class Structure extends Validator
*
* Returns true if valid or false if not.
*
- * @param Document $document
+ * @param mixed $document
*
* @return bool
*/
@@ -156,9 +156,14 @@ class Structure extends Validator
foreach ($array as $key => $value) {
$rule = $collection->search('key', $key, $rules);
- $ruleType = (isset($rule['type'])) ? $rule['type'] : '';
- $ruleRequired = (isset($rule['required'])) ? $rule['required'] : true;
- $ruleArray = (isset($rule['array'])) ? $rule['array'] : false;
+
+ if(!$rule) {
+ continue;
+ }
+
+ $ruleType = $rule['type'] ?? '';
+ $ruleRequired = $rule['required'] ?? true;
+ $ruleArray = $rule['array'] ?? false;
$validator = null;
switch ($ruleType) {
@@ -269,7 +274,14 @@ class Structure extends Validator
return true;
}
- protected function getCollection($id)
+ /**
+ * Get Collection
+ *
+ * Get Collection by unique ID
+ *
+ * @return Document
+ */
+ protected function getCollection($id): Document
{
return $this->database->getDocument($id);
}
diff --git a/src/Appwrite/Database/Validator/UID.php b/src/Appwrite/Database/Validator/UID.php
index c6a3c10910..a68c3da358 100644
--- a/src/Appwrite/Database/Validator/UID.php
+++ b/src/Appwrite/Database/Validator/UID.php
@@ -15,7 +15,7 @@ class UID extends Validator
*/
public function getDescription()
{
- return 'Validate UUID format';
+ return 'Invalid UID format';
}
/**
@@ -23,12 +23,20 @@ class UID extends Validator
*
* Returns true if valid or false if not.
*
- * @param string $value
+ * @param mixed $value
*
* @return bool
*/
public function isValid($value)
{
+ if ($value === 0) { // TODO Deprecate confition when we get the chance.
+ return true;
+ }
+
+ if (!is_string($value)) {
+ return false;
+ }
+
if(mb_strlen($value) > 32) {
return false;
}
diff --git a/src/Appwrite/Docker/Compose.php b/src/Appwrite/Docker/Compose.php
index d186f94790..e9fb906873 100644
--- a/src/Appwrite/Docker/Compose.php
+++ b/src/Appwrite/Docker/Compose.php
@@ -28,7 +28,7 @@ class Compose
}
/**
- * @return array
+ * @return string
*/
public function getVersion(): string
{
diff --git a/src/Appwrite/Docker/Compose/Service.php b/src/Appwrite/Docker/Compose/Service.php
index dcb4ce7375..476e9a40eb 100644
--- a/src/Appwrite/Docker/Compose/Service.php
+++ b/src/Appwrite/Docker/Compose/Service.php
@@ -54,7 +54,7 @@ class Service
public function getImageVersion(): string
{
$image = $this->getImage();
- return substr($image, strpos($image, ':')+1);
+ return substr($image, ((int)strpos($image, ':'))+1);
}
/**
diff --git a/src/Appwrite/Docker/Env.php b/src/Appwrite/Docker/Env.php
index c1f25d5e4c..f97f68b009 100644
--- a/src/Appwrite/Docker/Env.php
+++ b/src/Appwrite/Docker/Env.php
@@ -46,7 +46,7 @@ class Env
/**
* @param string $key
*
- * @return mixed|null
+ * @return string
*/
public function getVar(string $key): string
{
diff --git a/src/Appwrite/Extend/PDO.php b/src/Appwrite/Extend/PDO.php
index fce9165b4e..72f9f37ac3 100644
--- a/src/Appwrite/Extend/PDO.php
+++ b/src/Appwrite/Extend/PDO.php
@@ -59,9 +59,11 @@ class PDO extends PDONative
return $this->pdo->quote($string, $parameter_type);
}
- public function reconnect()
+ public function reconnect(): PDONative
{
$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/Network/Validator/CNAME.php b/src/Appwrite/Network/Validator/CNAME.php
index 54e4987f16..1d299e48c3 100644
--- a/src/Appwrite/Network/Validator/CNAME.php
+++ b/src/Appwrite/Network/Validator/CNAME.php
@@ -7,7 +7,7 @@ use Utopia\Validator;
class CNAME extends Validator
{
/**
- * @var int
+ * @var string
*/
protected $target;
@@ -19,6 +19,9 @@ class CNAME extends Validator
$this->target = $target;
}
+ /**
+ * @return string
+ */
public function getDescription()
{
return 'Invalid CNAME record';
@@ -27,19 +30,19 @@ class CNAME extends Validator
/**
* Check if CNAME record target value matches selected target
*
- * @param string $domain
+ * @param mixed $domain
*
* @return bool
*/
public function isValid($domain)
{
- try {
- $records = \dns_get_record($domain, DNS_CNAME);
- } catch (\Throwable $th) {
+ if(!is_string($domain)) {
return false;
}
- if (!$records || !\is_array($records)) {
+ try {
+ $records = \dns_get_record($domain, DNS_CNAME);
+ } catch (\Throwable $th) {
return false;
}
diff --git a/src/Appwrite/Network/Validator/Origin.php b/src/Appwrite/Network/Validator/Origin.php
index d1368a1c3e..62f1608af7 100644
--- a/src/Appwrite/Network/Validator/Origin.php
+++ b/src/Appwrite/Network/Validator/Origin.php
@@ -93,12 +93,16 @@ class Origin extends Validator
* Check if Origin has been whiltlisted
* for access to the API
*
- * @param string $origin
+ * @param mixed $origin
*
* @return bool
*/
public function isValid($origin)
{
+ if(!is_string($origin)) {
+ return false;
+ }
+
$scheme = \parse_url($origin, PHP_URL_SCHEME);
$host = \parse_url($origin, PHP_URL_HOST);
diff --git a/src/Appwrite/OpenSSL/OpenSSL.php b/src/Appwrite/OpenSSL/OpenSSL.php
index 24d48e2265..aa641ec839 100644
--- a/src/Appwrite/OpenSSL/OpenSSL.php
+++ b/src/Appwrite/OpenSSL/OpenSSL.php
@@ -53,7 +53,7 @@ class OpenSSL
* @param $length
* @param null $crypto_strong
*
- * @return int
+ * @return false|string
*/
public static function randomPseudoBytes($length, &$crypto_strong = null)
{
diff --git a/src/Appwrite/Preloader/Preloader.php b/src/Appwrite/Preloader/Preloader.php
deleted file mode 100644
index a03c0cb28e..0000000000
--- 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/src/Appwrite/Resize/Resize.php b/src/Appwrite/Resize/Resize.php
index 28d345d039..a9257b6e48 100644
--- a/src/Appwrite/Resize/Resize.php
+++ b/src/Appwrite/Resize/Resize.php
@@ -34,7 +34,7 @@ class Resize
*
* @return Resize
*
- * @throws \ImagickException
+ * @throws \Throwable
*/
public function crop(int $width, int $height)
{
@@ -73,7 +73,7 @@ class Resize
*
* @return Resize
*
- * @throws \ImagickException
+ * @throws \Throwable
*/
public function setBackground($color)
{
@@ -133,7 +133,7 @@ class Resize
case 'webp':
try {
$this->image->setImageFormat('webp');
- } catch (\ImagickException $th) {
+ } catch (\Throwable $th) {
$signature = $this->image->getImageSignature();
$temp = '/tmp/temp-'.$signature.'.'.\strtolower($this->image->getImageFormat());
$output = '/tmp/output-'.$signature.'.webp';
diff --git a/src/Appwrite/Storage/Device.php b/src/Appwrite/Storage/Device.php
index 42774e01f5..5beb6060f7 100644
--- a/src/Appwrite/Storage/Device.php
+++ b/src/Appwrite/Storage/Device.php
@@ -13,7 +13,7 @@ abstract class Device
*
* @return string
*/
- abstract public function getName():string;
+ abstract public function getName(): string;
/**
* Get Description.
@@ -22,7 +22,7 @@ abstract class Device
*
* @return string
*/
- abstract public function getDescription():string;
+ abstract public function getDescription(): string;
/**
* Get Root.
@@ -31,7 +31,7 @@ abstract class Device
*
* @return string
*/
- abstract public function getRoot():string;
+ abstract public function getRoot(): string;
/**
* Get Path.
@@ -42,7 +42,7 @@ abstract class Device
*
* @return string
*/
- abstract public function getPath($filename):string;
+ abstract public function getPath($filename): string;
/**
* Upload.
@@ -56,7 +56,7 @@ abstract class Device
*
* @return bool
*/
- abstract public function upload($source, $path):bool;
+ abstract public function upload($source, $path): bool;
/**
* Read file by given path.
@@ -65,7 +65,7 @@ abstract class Device
*
* @return string
*/
- abstract public function read(string $path):string;
+ abstract public function read(string $path): string;
/**
* Write file by given path.
@@ -73,9 +73,9 @@ abstract class Device
* @param string $path
* @param string $data
*
- * @return string
+ * @return bool
*/
- abstract public function write(string $path, string $data):bool;
+ abstract public function write(string $path, string $data): bool;
/**
* Move file from given source to given path, return true on success and false on failure.
@@ -87,7 +87,7 @@ abstract class Device
*
* @return bool
*/
- abstract public function move(string $source, string $target):bool;
+ abstract public function move(string $source, string $target): bool;
/**
* Delete file in given path return true on success and false on failure.
@@ -99,7 +99,7 @@ abstract class Device
*
* @return bool
*/
- abstract public function delete(string $path, bool $recursive = false):bool;
+ abstract public function delete(string $path, bool $recursive = false): bool;
/**
* Returns given file path its size.
@@ -110,7 +110,7 @@ abstract class Device
*
* @return int
*/
- abstract public function getFileSize(string $path):int;
+ abstract public function getFileSize(string $path): int;
/**
* Returns given file path its mime type.
@@ -121,7 +121,7 @@ abstract class Device
*
* @return string
*/
- abstract public function getFileMimeType(string $path):string;
+ abstract public function getFileMimeType(string $path): string;
/**
* Returns given file path its MD5 hash value.
@@ -132,7 +132,7 @@ abstract class Device
*
* @return string
*/
- abstract public function getFileHash(string $path):string;
+ abstract public function getFileHash(string $path): string;
/**
* Get directory size in bytes.
@@ -145,7 +145,7 @@ abstract class Device
*
* @return int
*/
- abstract public function getDirectorySize(string $path):int;
+ abstract public function getDirectorySize(string $path): int;
/**
* Get Partition Free Space.
@@ -154,7 +154,7 @@ abstract class Device
*
* @return float
*/
- abstract public function getPartitionFreeSpace():float;
+ abstract public function getPartitionFreeSpace(): float;
/**
* Get Partition Total Space.
@@ -163,5 +163,5 @@ abstract class Device
*
* @return float
*/
- abstract public function getPartitionTotalSpace():float;
+ abstract public function getPartitionTotalSpace(): float;
}
diff --git a/src/Appwrite/Storage/Device/Local.php b/src/Appwrite/Storage/Device/Local.php
index d786e2b076..81f97b8a7f 100644
--- a/src/Appwrite/Storage/Device/Local.php
+++ b/src/Appwrite/Storage/Device/Local.php
@@ -72,7 +72,7 @@ class Local extends Device
*
* @throws \Exception
*
- * @return string|bool saved destination on success or false on failures
+ * @return bool
*/
public function upload($source, $path):bool
{
@@ -109,7 +109,7 @@ class Local extends Device
*
* @return bool
*/
- public function write(string $path, string $data):bool
+ public function write(string $path, string $data): bool
{
if (!\file_exists(\dirname($path))) { // Checks if directory path to file exists
if (!@\mkdir(\dirname($path), 0755, true)) {
@@ -117,7 +117,7 @@ class Local extends Device
}
}
- return \file_put_contents($path, $data);
+ return (bool)\file_put_contents($path, $data);
}
/**
diff --git a/src/Appwrite/Storage/Device/S3.php b/src/Appwrite/Storage/Device/S3.php
index 2b46c8d447..adfe7e8bee 100644
--- a/src/Appwrite/Storage/Device/S3.php
+++ b/src/Appwrite/Storage/Device/S3.php
@@ -51,7 +51,7 @@ class S3 extends Device
*
* @throws \Exception
*
- * @return string|bool saved destination on success or false on failures
+ * @return bool
*/
public function upload($source, $path):bool
{
diff --git a/src/Appwrite/Storage/Storage.php b/src/Appwrite/Storage/Storage.php
index 30718dc0ab..fc98f19fdb 100644
--- a/src/Appwrite/Storage/Storage.php
+++ b/src/Appwrite/Storage/Storage.php
@@ -24,8 +24,10 @@ class Storage
* @param Device $device
*
* @throws Exception
+ *
+ * @return void
*/
- public static function setDevice($name, Device $device)
+ public static function setDevice($name, Device $device): void
{
self::$devices[$name] = $device;
}
@@ -104,7 +106,7 @@ class Storage
),
);
- $factor = floor((strlen($bytes) - 1) / 3);
+ $factor = (int)floor((strlen((string)$bytes) - 1) / 3);
return sprintf("%.{$decimals}f%s", $bytes / pow($mod, $factor), $units[$system][$factor]);
}
diff --git a/src/Appwrite/Storage/Validator/File.php b/src/Appwrite/Storage/Validator/File.php
index bbae19e612..1ca7140bb1 100644
--- a/src/Appwrite/Storage/Validator/File.php
+++ b/src/Appwrite/Storage/Validator/File.php
@@ -16,7 +16,7 @@ class File extends Validator
*
* TODO think what to do here, currently only used for parameter to be present in SDKs
*
- * @param string $name
+ * @param mixed $name
*
* @return bool
*/
diff --git a/src/Appwrite/Storage/Validator/FileName.php b/src/Appwrite/Storage/Validator/FileName.php
index 728e46552b..a7d2e43a79 100644
--- a/src/Appwrite/Storage/Validator/FileName.php
+++ b/src/Appwrite/Storage/Validator/FileName.php
@@ -14,7 +14,7 @@ class FileName extends Validator
/**
* The file name can only contain "a-z", "A-Z", "0-9" and "-" and not empty.
*
- * @param string $name
+ * @param mixed $name
*
* @return bool
*/
@@ -24,6 +24,10 @@ class FileName extends Validator
return false;
}
+ if(!is_string($name)) {
+ return false;
+ }
+
if (!\preg_match('/^[a-zA-Z0-9.]+$/', $name)) {
return false;
}
diff --git a/src/Appwrite/Storage/Validator/FileSize.php b/src/Appwrite/Storage/Validator/FileSize.php
index 1f66e3f021..ab5d361442 100644
--- a/src/Appwrite/Storage/Validator/FileSize.php
+++ b/src/Appwrite/Storage/Validator/FileSize.php
@@ -29,12 +29,16 @@ class FileSize extends Validator
/**
* Finds whether a file size is smaller than required limit.
*
- * @param int $fileSize
+ * @param mixed $fileSize
*
* @return bool
*/
public function isValid($fileSize)
{
+ if(!is_int($fileSize)) {
+ return false;
+ }
+
if ($fileSize > $this->max) {
return false;
}
diff --git a/src/Appwrite/Storage/Validator/Upload.php b/src/Appwrite/Storage/Validator/Upload.php
index c5bef78c41..0239464428 100644
--- a/src/Appwrite/Storage/Validator/Upload.php
+++ b/src/Appwrite/Storage/Validator/Upload.php
@@ -14,12 +14,16 @@ class Upload extends Validator
/**
* Check if a file is a valid upload file
*
- * @param string $path
+ * @param mixed $path
*
* @return bool
*/
public function isValid($path)
{
+ if(!is_string($path)) {
+ return false;
+ }
+
if (\is_uploaded_file($path)) {
return true;
}
diff --git a/src/Appwrite/Swoole/Files.php b/src/Appwrite/Swoole/Files.php
index aedfd22e01..7971beba2b 100644
--- a/src/Appwrite/Swoole/Files.php
+++ b/src/Appwrite/Swoole/Files.php
@@ -32,20 +32,24 @@ class Files
/**
* Add MimeType
- *
+ *
* @var string $mimeType
+ *
+ * @return void
*/
- public static function addMimeType(string $mimeType)
+ public static function addMimeType(string $mimeType): void
{
self::$mimeTypes[$mimeType] = true;
}
/**
* Remove MimeType
- *
+ *
* @var string $mimeType
+ *
+ * @return void
*/
- public static function removeMimeType(string $mimeType)
+ public static function removeMimeType(string $mimeType): void
{
if(isset(self::$mimeTypes[$mimeType])) {
unset(self::$mimeTypes[$mimeType]);
@@ -74,10 +78,12 @@ class Files
/**
* Load
- *
+ *
* @var string $path
+ *
+ * @return void
*/
- public static function load(string $directory, string $root = null)
+ public static function load(string $directory, string $root = null): void
{
if(!is_readable($directory)) {
throw new Exception('Failed to load directory: '.$directory);
diff --git a/src/Appwrite/Swoole/Request.php b/src/Appwrite/Swoole/Request.php
index 55b599738c..4535924686 100644
--- a/src/Appwrite/Swoole/Request.php
+++ b/src/Appwrite/Swoole/Request.php
@@ -12,7 +12,7 @@ class Request extends UtopiaRequest
*
* @var SwooleRequest
*/
- protected $swoole = null;
+ protected $swoole;
/**
* Request constructor.
@@ -265,9 +265,10 @@ class Request extends UtopiaRequest
*
* Method for querying HTTP cookie parameters. If $key is not found $default value will be returned.
*
- * @param string $key
- * @param string $default
- * @return mixed
+ * @param string $key
+ * @param string $default
+ *
+ * @return string
*/
public function getCookie(string $key, string $default = ''): string
{
diff --git a/src/Appwrite/Swoole/Response.php b/src/Appwrite/Swoole/Response.php
index 88ab1fcd43..7661011460 100644
--- a/src/Appwrite/Swoole/Response.php
+++ b/src/Appwrite/Swoole/Response.php
@@ -12,7 +12,7 @@ class Response extends UtopiaResponse
*
* @var SwooleResponse
*/
- protected $swoole = null;
+ protected $swoole;
/**
* Mime Types
@@ -50,12 +50,12 @@ class Response extends UtopiaResponse
* @param string $body
* @param int $exit exit code or don't exit if code is null
*
- * @return self
+ * @return void
*/
public function send(string $body = '', int $exit = null): void
{
if(!$this->disablePayload) {
- $this->addHeader('X-Debug-Speed', microtime(true) - $this->startTime);
+ $this->addHeader('X-Debug-Speed', (string)(microtime(true) - $this->startTime));
$this
->appendCookies()
@@ -96,7 +96,7 @@ class Response extends UtopiaResponse
protected function appendHeaders(): self
{
// Send status code header
- $this->swoole->status($this->statusCode);
+ $this->swoole->status((string)$this->statusCode);
// Send content type header
$this
diff --git a/src/Appwrite/URL/URL.php b/src/Appwrite/URL/URL.php
index 5f2b54a65e..6e32f8dfb1 100644
--- a/src/Appwrite/URL/URL.php
+++ b/src/Appwrite/URL/URL.php
@@ -97,9 +97,9 @@ class URL
*
* Convert query string array to string
*
- * @param string $query
+ * @param array $query
*
- * @return array
+ * @return string
*/
public static function unparseQuery(array $query):string
{
diff --git a/src/Appwrite/Utopia/Response.php b/src/Appwrite/Utopia/Response.php
index 414168ce93..b2a9f5b5dd 100644
--- a/src/Appwrite/Utopia/Response.php
+++ b/src/Appwrite/Utopia/Response.php
@@ -52,8 +52,10 @@ class Response extends UtopiaResponse
/**
* Response constructor.
+ *
+ * @param float $time
*/
- public function __construct(int $time = 0)
+ public function __construct(float $time = 0)
{
$this
->setModel(new Error())
@@ -161,8 +163,10 @@ class Response extends UtopiaResponse
* @see https://en.wikipedia.org/wiki/YAML
*
* @param array $data
+ *
+ * @return void
*/
- public function yaml(array $data)
+ public function yaml(array $data): void
{
if(!extension_loaded('yaml')) {
throw new Exception('Missing yaml extension. Learn more at: https://www.php.net/manual/en/book.yaml.php');
diff --git a/src/Appwrite/Utopia/Response/Model.php b/src/Appwrite/Utopia/Response/Model.php
index b50224935b..36a2745e0e 100644
--- a/src/Appwrite/Utopia/Response/Model.php
+++ b/src/Appwrite/Utopia/Response/Model.php
@@ -4,6 +4,9 @@ namespace Appwrite\Utopia\Response;
abstract class Model
{
+ /**
+ * @return array
+ */
protected $rules = [];
/**
@@ -23,7 +26,7 @@ abstract class Model
/**
* Get Rules
*
- * @return string
+ * @return array
*/
public function getRules(): array
{
diff --git a/src/Appwrite/Utopia/Response/Model/Error.php b/src/Appwrite/Utopia/Response/Model/Error.php
index 95a4764d4a..44cb2a1c85 100644
--- a/src/Appwrite/Utopia/Response/Model/Error.php
+++ b/src/Appwrite/Utopia/Response/Model/Error.php
@@ -23,7 +23,7 @@ class Error extends Model
->addRule('version', [
'type' => 'string',
'description' => 'Server version number.',
- 'example' => APP_VERSION_STABLE,
+ 'example' => '1.0',
])
;
}
diff --git a/src/Appwrite/Utopia/Response/Model/Locale.php b/src/Appwrite/Utopia/Response/Model/Locale.php
index b6482d7a95..1097a9457d 100644
--- a/src/Appwrite/Utopia/Response/Model/Locale.php
+++ b/src/Appwrite/Utopia/Response/Model/Locale.php
@@ -43,7 +43,6 @@ class Locale extends Model
])
->addRule('currency', [
'type' => 'string',
- 'description' => 'ISO 4217 Email verification status.',
'description' => 'Currency code in [ISO 4217-1](http://en.wikipedia.org/wiki/ISO_4217) three-character format',
'example' => 'USD',
])
diff --git a/tests/e2e/Client.php b/tests/e2e/Client.php
index 5a84716b52..e2a805a2b5 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, ';'))) {
@@ -236,7 +236,7 @@ class Client
$responseHeaders['status-code'] = $responseStatus;
if($responseStatus === 500) {
- echo 'Server error(!): '.json_encode($responseBody)."\n";
+ echo 'Server error('.$method.': '.$path.'. Params: '.json_encode($params).'): '.json_encode($responseBody)."\n";
}
return [
diff --git a/tests/e2e/Services/Account/AccountBase.php b/tests/e2e/Services/Account/AccountBase.php
index 4e95148a65..d070ed3e7f 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 80ee47c72a..a167b3763a 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 7f0441a88d..9aac863039 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 7e4e6c1e41..ac3ff87240 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 73bdfe7199..a8ac2ac433 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 ceb0d86e5c..25bbcbdd58 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 1547a4e289..9869ce5906 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 4a31929470..8309ce62d8 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 0000000000..2a7c9d58e9
--- /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'));
+ }
+}