From 98508843f27a0813d6b5de1602e600b7b05b4934 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 16 May 2021 19:41:09 +0545 Subject: [PATCH 01/35] first draft using utopia-php database --- composer.json | 11 ++++-- src/Audit/Audit.php | 71 +++++++++++++++++++++++++++++++++------ tests/Audit/AuditTest.php | 17 ++++++---- 3 files changed, 80 insertions(+), 19 deletions(-) diff --git a/composer.json b/composer.json index c1e8c9d..0d07524 100755 --- a/composer.json +++ b/composer.json @@ -16,10 +16,17 @@ }, "require": { "php": ">=7.4", - "ext-pdo": "*" + "ext-pdo": "*", + "utopia-php/database": "dev-feat-new-doc-methods" }, "require-dev": { "phpunit/phpunit": "^9.3", "vimeo/psalm": "4.0.1" - } + }, + "repositories": [ + { + "type": "git", + "url": "https://github.com/utopia-php/database" + } + ] } diff --git a/src/Audit/Audit.php b/src/Audit/Audit.php index 3521834..1152b28 100644 --- a/src/Audit/Audit.php +++ b/src/Audit/Audit.php @@ -1,20 +1,46 @@ adapter = $adapter; + $this->db = $db; + $this->init(); + } + + private function init() { + if(!$this->db->exists()) { + $this->db->create(); + $this->db->createCollection(Audit::COLLECTION); + $this->db->createAttribute(Audit::COLLECTION, 'userId', Database::VAR_STRING, 45, true); + $this->db->createAttribute(Audit::COLLECTION,'event',Database::VAR_STRING,45,true); + $this->db->createAttribute(Audit::COLLECTION,'resource',Database::VAR_STRING,45,false); + $this->db->createAttribute(Audit::COLLECTION,'userAgent',Database::VAR_STRING,65534,true); + $this->db->createAttribute(Audit::COLLECTION,'ip',Database::VAR_STRING,45,true); + $this->db->createAttribute(Audit::COLLECTION,'location',Database::VAR_STRING,45,false); + $this->db->createAttribute(Audit::COLLECTION,'time',Database::VAR_INTEGER,0,true,false); + $this->db->createAttribute(Audit::COLLECTION,'data',Database::VAR_STRING,0,false); + + $this->db->createIndex(Audit::COLLECTION, 'index_1', Database::INDEX_KEY, ['userId']); + $this->db->createIndex(Audit::COLLECTION, 'index_1', Database::INDEX_KEY, ['event']); + $this->db->createIndex(Audit::COLLECTION, 'index_1', Database::INDEX_KEY, ['resource']); + + + } } /** @@ -34,7 +60,18 @@ public function __construct(Adapter $adapter) */ public function log(string $userId, string $event, string $resource, string $userAgent, string $ip, string $location, array $data = []): bool { - return $this->adapter->log($userId, $event, $resource, $userAgent, $ip, $location, $data); + $this->db->createDocument(Audit::COLLECTION, new Document([ + '$read' => [], + '$write' => [], + 'userId' => $userId, + 'event' => $event, + 'resource' => $resource, + 'userAgent' => $userAgent, + 'ip' => $ip, + 'location' => $location, + 'data' => $data + ])); + return true; } /** @@ -46,7 +83,9 @@ public function log(string $userId, string $event, string $resource, string $use */ public function getLogsByUser(string $userId): array { - return $this->adapter->getLogsByUser($userId); + return $this->db->find(Audit::COLLECTION, [ + new Query('userId', Query::TYPE_EQUAL, [$userId]) + ]); } /** @@ -58,7 +97,9 @@ public function getLogsByUser(string $userId): array */ public function getLogsByResource(string $resource): array { - return $this->adapter->getLogsByResource($resource); + return $this->db->find(Audit::COLLECTION, [ + new Query('resource', Query::TYPE_EQUAL, [$resource]) + ]); } /** @@ -73,7 +114,10 @@ public function getLogsByResource(string $resource): array */ public function getLogsByUserAndActions(string $userId, array $actions): array { - return $this->adapter->getLogsByUserAndActions($userId, $actions); + return $this->db->find(Audit::COLLECTION, [ + new Query('userId', Query::TYPE_EQUAL, [$userId]), + new Query('event',Query::TYPE_EQUAL, $actions) + ]); } /** @@ -85,6 +129,13 @@ public function getLogsByUserAndActions(string $userId, array $actions): array */ public function cleanup(int $timestamp): bool { - return $this->adapter->cleanup($timestamp); + $documents = $this->db->find(Audit::COLLECTION, [ + new Query('time', Query::TYPE_LESSER, [$timestamp]) + ]); + + foreach ($documents as $document) { + $this->db->deleteDocument(Audit::COLLECTION,$document['$id']); + } + return true; } } diff --git a/tests/Audit/AuditTest.php b/tests/Audit/AuditTest.php index 46479f7..284b45b 100755 --- a/tests/Audit/AuditTest.php +++ b/tests/Audit/AuditTest.php @@ -15,8 +15,11 @@ use PDO; use Utopia\Audit\Audit; -use Utopia\Audit\Adapters\MySQL; use PHPUnit\Framework\TestCase; +use Utopia\Cache\Cache; +use Utopia\Cache\Adapter\None as NoCache; +use Utopia\Database\Adapter\MySQL; +use Utopia\Database\Database; class AuditTest extends TestCase { @@ -41,13 +44,13 @@ public function setUp(): void $pdo->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC); // Return arrays $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // Handle all errors with exceptions - $adapter = new MySQL($pdo); - - $adapter - ->setNamespace('namespace') // DB table namespace - ; + + $cache = new Cache(new NoCache()); - $this->audit = new Audit($adapter); + $database = new Database(new MySQL($pdo),$cache); + $database->setNamespace('namespace'); + + $this->audit = new Audit($database); } public function tearDown(): void From 8f77fce5eca7764816b454f9a13442e48dff88f9 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 16 May 2021 19:45:00 +0545 Subject: [PATCH 02/35] disabling authorization --- tests/Audit/AuditTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/Audit/AuditTest.php b/tests/Audit/AuditTest.php index 284b45b..c2e536a 100755 --- a/tests/Audit/AuditTest.php +++ b/tests/Audit/AuditTest.php @@ -20,6 +20,7 @@ use Utopia\Cache\Adapter\None as NoCache; use Utopia\Database\Adapter\MySQL; use Utopia\Database\Database; +use Utopia\Database\Validator\Authorization; class AuditTest extends TestCase { @@ -51,10 +52,12 @@ public function setUp(): void $database->setNamespace('namespace'); $this->audit = new Audit($database); + Authorization::disable(); } public function tearDown(): void { + Authorization::reset(); $this->audit = null; } @@ -65,7 +68,6 @@ public function testLog() $ip = '127.0.0.1'; $location = 'US'; $data = ['key1' => 'value1','key2' => 'value2']; - $this->assertEquals($this->audit->log($userId, 'update', 'database/document/1', $userAgent, $ip, $location, $data), true); $this->assertEquals($this->audit->log($userId, 'update', 'database/document/2', $userAgent, $ip, $location, $data), true); $this->assertEquals($this->audit->log($userId, 'delete', 'database/document/2', $userAgent, $ip, $location, $data), true); From 654e640df556b5989d65252036f60eca96068d68 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 16 May 2021 19:48:14 +0545 Subject: [PATCH 03/35] fix pslam issue --- src/Audit/Audit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Audit/Audit.php b/src/Audit/Audit.php index 1152b28..1a9a5a9 100644 --- a/src/Audit/Audit.php +++ b/src/Audit/Audit.php @@ -22,7 +22,7 @@ public function __construct(Database $db) $this->init(); } - private function init() { + private function init() : void { if(!$this->db->exists()) { $this->db->create(); $this->db->createCollection(Audit::COLLECTION); From 45764dced21e1cf23e23cb77b453a646e1c2cc89 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 16 May 2021 19:48:44 +0545 Subject: [PATCH 04/35] disable authorization before creation --- tests/Audit/AuditTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/Audit/AuditTest.php b/tests/Audit/AuditTest.php index c2e536a..9d331e2 100755 --- a/tests/Audit/AuditTest.php +++ b/tests/Audit/AuditTest.php @@ -40,19 +40,19 @@ public function setUp(): void PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8', PDO::ATTR_TIMEOUT => 5 // Seconds )); - + // Connection settings $pdo->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC); // Return arrays $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // Handle all errors with exceptions - + $cache = new Cache(new NoCache()); - + $database = new Database(new MySQL($pdo),$cache); $database->setNamespace('namespace'); - $this->audit = new Audit($database); Authorization::disable(); + $this->audit = new Audit($database); } public function tearDown(): void From a58413da493b584577842d678b2b474180d5bf8a Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 16 May 2021 19:54:29 +0545 Subject: [PATCH 05/35] authorization disable in audit itself --- src/Audit/Audit.php | 57 ++++++++++++++++++++++++--------------- tests/Audit/AuditTest.php | 2 -- 2 files changed, 36 insertions(+), 23 deletions(-) diff --git a/src/Audit/Audit.php b/src/Audit/Audit.php index 1a9a5a9..ec34d96 100644 --- a/src/Audit/Audit.php +++ b/src/Audit/Audit.php @@ -1,9 +1,11 @@ init(); } - private function init() : void { - if(!$this->db->exists()) { + private function init(): void + { + if (!$this->db->exists()) { $this->db->create(); $this->db->createCollection(Audit::COLLECTION); $this->db->createAttribute(Audit::COLLECTION, 'userId', Database::VAR_STRING, 45, true); - $this->db->createAttribute(Audit::COLLECTION,'event',Database::VAR_STRING,45,true); - $this->db->createAttribute(Audit::COLLECTION,'resource',Database::VAR_STRING,45,false); - $this->db->createAttribute(Audit::COLLECTION,'userAgent',Database::VAR_STRING,65534,true); - $this->db->createAttribute(Audit::COLLECTION,'ip',Database::VAR_STRING,45,true); - $this->db->createAttribute(Audit::COLLECTION,'location',Database::VAR_STRING,45,false); - $this->db->createAttribute(Audit::COLLECTION,'time',Database::VAR_INTEGER,0,true,false); - $this->db->createAttribute(Audit::COLLECTION,'data',Database::VAR_STRING,0,false); + $this->db->createAttribute(Audit::COLLECTION, 'event', Database::VAR_STRING, 45, true); + $this->db->createAttribute(Audit::COLLECTION, 'resource', Database::VAR_STRING, 45, false); + $this->db->createAttribute(Audit::COLLECTION, 'userAgent', Database::VAR_STRING, 65534, true); + $this->db->createAttribute(Audit::COLLECTION, 'ip', Database::VAR_STRING, 45, true); + $this->db->createAttribute(Audit::COLLECTION, 'location', Database::VAR_STRING, 45, false); + $this->db->createAttribute(Audit::COLLECTION, 'time', Database::VAR_INTEGER, 0, true, false); + $this->db->createAttribute(Audit::COLLECTION, 'data', Database::VAR_STRING, 0, false); $this->db->createIndex(Audit::COLLECTION, 'index_1', Database::INDEX_KEY, ['userId']); $this->db->createIndex(Audit::COLLECTION, 'index_1', Database::INDEX_KEY, ['event']); $this->db->createIndex(Audit::COLLECTION, 'index_1', Database::INDEX_KEY, ['resource']); - } } @@ -60,6 +62,7 @@ private function init() : void { */ public function log(string $userId, string $event, string $resource, string $userAgent, string $ip, string $location, array $data = []): bool { + Authorization::disable(); $this->db->createDocument(Audit::COLLECTION, new Document([ '$read' => [], '$write' => [], @@ -69,8 +72,9 @@ public function log(string $userId, string $event, string $resource, string $use 'userAgent' => $userAgent, 'ip' => $ip, 'location' => $location, - 'data' => $data + 'data' => $data, ])); + Authorization::reset(); return true; } @@ -83,9 +87,12 @@ public function log(string $userId, string $event, string $resource, string $use */ public function getLogsByUser(string $userId): array { - return $this->db->find(Audit::COLLECTION, [ - new Query('userId', Query::TYPE_EQUAL, [$userId]) + Authorization::disable(); + $result = $this->db->find(Audit::COLLECTION, [ + new Query('userId', Query::TYPE_EQUAL, [$userId]), ]); + Authorization::reset(); + return $result; } /** @@ -97,9 +104,12 @@ public function getLogsByUser(string $userId): array */ public function getLogsByResource(string $resource): array { - return $this->db->find(Audit::COLLECTION, [ - new Query('resource', Query::TYPE_EQUAL, [$resource]) + Authorization::disable(); + $results = $this->db->find(Audit::COLLECTION, [ + new Query('resource', Query::TYPE_EQUAL, [$resource]), ]); + Authorization::reset(); + return $results; } /** @@ -114,28 +124,33 @@ public function getLogsByResource(string $resource): array */ public function getLogsByUserAndActions(string $userId, array $actions): array { - return $this->db->find(Audit::COLLECTION, [ + Authorization::disable(); + $results = $this->db->find(Audit::COLLECTION, [ new Query('userId', Query::TYPE_EQUAL, [$userId]), - new Query('event',Query::TYPE_EQUAL, $actions) + new Query('event', Query::TYPE_EQUAL, $actions), ]); + Authorization::reset(); + return $results; } /** * Delete all logs older than $timestamp seconds * * @param int $timestamp - * + * * @return bool */ public function cleanup(int $timestamp): bool { + Authorization::disable(); $documents = $this->db->find(Audit::COLLECTION, [ - new Query('time', Query::TYPE_LESSER, [$timestamp]) + new Query('time', Query::TYPE_LESSER, [$timestamp]), ]); - + foreach ($documents as $document) { - $this->db->deleteDocument(Audit::COLLECTION,$document['$id']); + $this->db->deleteDocument(Audit::COLLECTION, $document['$id']); } + Authorization::reset(); return true; } } diff --git a/tests/Audit/AuditTest.php b/tests/Audit/AuditTest.php index 9d331e2..20c33ee 100755 --- a/tests/Audit/AuditTest.php +++ b/tests/Audit/AuditTest.php @@ -51,13 +51,11 @@ public function setUp(): void $database = new Database(new MySQL($pdo),$cache); $database->setNamespace('namespace'); - Authorization::disable(); $this->audit = new Audit($database); } public function tearDown(): void { - Authorization::reset(); $this->audit = null; } From be19b85fe91988c2e7fdcc9bfa5d7e52641ca9f5 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 16 May 2021 19:57:26 +0545 Subject: [PATCH 06/35] fix collection name --- src/Audit/Audit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Audit/Audit.php b/src/Audit/Audit.php index ec34d96..4970a23 100644 --- a/src/Audit/Audit.php +++ b/src/Audit/Audit.php @@ -9,7 +9,7 @@ class Audit { - const COLLECTION = "abuse.abuse"; + const COLLECTION = "abuse"; /** * @var Database */ From 2c6cfd9b53b4e62b0af3fe245a6448270f96435b Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 16 May 2021 20:02:32 +0545 Subject: [PATCH 07/35] fix index and missing time attribute --- src/Audit/Audit.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Audit/Audit.php b/src/Audit/Audit.php index 4970a23..a3036c9 100644 --- a/src/Audit/Audit.php +++ b/src/Audit/Audit.php @@ -39,8 +39,8 @@ private function init(): void $this->db->createAttribute(Audit::COLLECTION, 'data', Database::VAR_STRING, 0, false); $this->db->createIndex(Audit::COLLECTION, 'index_1', Database::INDEX_KEY, ['userId']); - $this->db->createIndex(Audit::COLLECTION, 'index_1', Database::INDEX_KEY, ['event']); - $this->db->createIndex(Audit::COLLECTION, 'index_1', Database::INDEX_KEY, ['resource']); + $this->db->createIndex(Audit::COLLECTION, 'index_2', Database::INDEX_KEY, ['event']); + $this->db->createIndex(Audit::COLLECTION, 'index_3', Database::INDEX_KEY, ['resource']); } } @@ -73,8 +73,8 @@ public function log(string $userId, string $event, string $resource, string $use 'ip' => $ip, 'location' => $location, 'data' => $data, + 'time' => \time() ])); - Authorization::reset(); return true; } From b396b8bffd29b27af015c0af04cab61c0ddbe7c8 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 16 May 2021 20:03:58 +0545 Subject: [PATCH 08/35] add json filter --- src/Audit/Audit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Audit/Audit.php b/src/Audit/Audit.php index a3036c9..657a346 100644 --- a/src/Audit/Audit.php +++ b/src/Audit/Audit.php @@ -36,7 +36,7 @@ private function init(): void $this->db->createAttribute(Audit::COLLECTION, 'ip', Database::VAR_STRING, 45, true); $this->db->createAttribute(Audit::COLLECTION, 'location', Database::VAR_STRING, 45, false); $this->db->createAttribute(Audit::COLLECTION, 'time', Database::VAR_INTEGER, 0, true, false); - $this->db->createAttribute(Audit::COLLECTION, 'data', Database::VAR_STRING, 0, false); + $this->db->createAttribute(Audit::COLLECTION, 'data', Database::VAR_STRING, 0, false,true,false,['json']); $this->db->createIndex(Audit::COLLECTION, 'index_1', Database::INDEX_KEY, ['userId']); $this->db->createIndex(Audit::COLLECTION, 'index_2', Database::INDEX_KEY, ['event']); From 500f5ea53e3541e30effb62a475dfe10df8b4609 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 16 May 2021 20:07:11 +0545 Subject: [PATCH 09/35] fix data type --- src/Audit/Audit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Audit/Audit.php b/src/Audit/Audit.php index 657a346..295805c 100644 --- a/src/Audit/Audit.php +++ b/src/Audit/Audit.php @@ -36,7 +36,7 @@ private function init(): void $this->db->createAttribute(Audit::COLLECTION, 'ip', Database::VAR_STRING, 45, true); $this->db->createAttribute(Audit::COLLECTION, 'location', Database::VAR_STRING, 45, false); $this->db->createAttribute(Audit::COLLECTION, 'time', Database::VAR_INTEGER, 0, true, false); - $this->db->createAttribute(Audit::COLLECTION, 'data', Database::VAR_STRING, 0, false,true,false,['json']); + $this->db->createAttribute(Audit::COLLECTION, 'data', Database::VAR_STRING, 16777216, false,true,false,['json']); $this->db->createIndex(Audit::COLLECTION, 'index_1', Database::INDEX_KEY, ['userId']); $this->db->createIndex(Audit::COLLECTION, 'index_2', Database::INDEX_KEY, ['event']); From 396b5ee06a2460e93c53620b604555500ccae030 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 16 May 2021 20:46:37 +0545 Subject: [PATCH 10/35] Apply suggestions from code review Co-authored-by: Eldad A. Fux --- src/Audit/Audit.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Audit/Audit.php b/src/Audit/Audit.php index 295805c..39c988e 100644 --- a/src/Audit/Audit.php +++ b/src/Audit/Audit.php @@ -9,7 +9,7 @@ class Audit { - const COLLECTION = "abuse"; + const COLLECTION = "audit"; /** * @var Database */ @@ -29,9 +29,9 @@ private function init(): void if (!$this->db->exists()) { $this->db->create(); $this->db->createCollection(Audit::COLLECTION); - $this->db->createAttribute(Audit::COLLECTION, 'userId', Database::VAR_STRING, 45, true); - $this->db->createAttribute(Audit::COLLECTION, 'event', Database::VAR_STRING, 45, true); - $this->db->createAttribute(Audit::COLLECTION, 'resource', Database::VAR_STRING, 45, false); + $this->db->createAttribute(Audit::COLLECTION, 'userId', Database::VAR_STRING, Database::LENGTH_KEY, true); + $this->db->createAttribute(Audit::COLLECTION, 'event', Database::VAR_STRING, 255, true); + $this->db->createAttribute(Audit::COLLECTION, 'resource', Database::VAR_STRING, 255, false); $this->db->createAttribute(Audit::COLLECTION, 'userAgent', Database::VAR_STRING, 65534, true); $this->db->createAttribute(Audit::COLLECTION, 'ip', Database::VAR_STRING, 45, true); $this->db->createAttribute(Audit::COLLECTION, 'location', Database::VAR_STRING, 45, false); From 4b31db12f4592b311efed7b6734e2d1275d50889 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 16 May 2021 20:49:37 +0545 Subject: [PATCH 11/35] fix review comments --- src/Audit/Audit.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/Audit/Audit.php b/src/Audit/Audit.php index 39c988e..08d43e2 100644 --- a/src/Audit/Audit.php +++ b/src/Audit/Audit.php @@ -21,10 +21,10 @@ class Audit public function __construct(Database $db) { $this->db = $db; - $this->init(); + $this->setup(); } - private function init(): void + private function setup(): void { if (!$this->db->exists()) { $this->db->create(); @@ -36,11 +36,12 @@ private function init(): void $this->db->createAttribute(Audit::COLLECTION, 'ip', Database::VAR_STRING, 45, true); $this->db->createAttribute(Audit::COLLECTION, 'location', Database::VAR_STRING, 45, false); $this->db->createAttribute(Audit::COLLECTION, 'time', Database::VAR_INTEGER, 0, true, false); - $this->db->createAttribute(Audit::COLLECTION, 'data', Database::VAR_STRING, 16777216, false,true,false,['json']); + $this->db->createAttribute(Audit::COLLECTION, 'data', Database::VAR_STRING, 16777216, false, true, false, ['json']); $this->db->createIndex(Audit::COLLECTION, 'index_1', Database::INDEX_KEY, ['userId']); $this->db->createIndex(Audit::COLLECTION, 'index_2', Database::INDEX_KEY, ['event']); $this->db->createIndex(Audit::COLLECTION, 'index_3', Database::INDEX_KEY, ['resource']); + $this->db->createIndex(Audit::COLLECTION, 'index_4', Database::INDEX_KEY, ['userId', 'event']); } } @@ -73,8 +74,9 @@ public function log(string $userId, string $event, string $resource, string $use 'ip' => $ip, 'location' => $location, 'data' => $data, - 'time' => \time() + 'time' => \time(), ])); + Authorization::reset(); return true; } @@ -118,16 +120,16 @@ public function getLogsByResource(string $resource): array * Get all user logs logs by given action names * * @param string $userId - * @param array $actions + * @param array $events * * @return array */ - public function getLogsByUserAndActions(string $userId, array $actions): array + public function getLogsByUserAndActions(string $userId, array $events): array { Authorization::disable(); $results = $this->db->find(Audit::COLLECTION, [ new Query('userId', Query::TYPE_EQUAL, [$userId]), - new Query('event', Query::TYPE_EQUAL, $actions), + new Query('event', Query::TYPE_EQUAL, $events), ]); Authorization::reset(); return $results; From 6a4abc2569aa922b288b1b99d0234d15ae9e6be8 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 16 May 2021 20:50:02 +0545 Subject: [PATCH 12/35] make setup public --- src/Audit/Audit.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Audit/Audit.php b/src/Audit/Audit.php index 08d43e2..e4bdbd8 100644 --- a/src/Audit/Audit.php +++ b/src/Audit/Audit.php @@ -21,10 +21,9 @@ class Audit public function __construct(Database $db) { $this->db = $db; - $this->setup(); } - private function setup(): void + public function setup(): void { if (!$this->db->exists()) { $this->db->create(); From d06ced2c0c6074d48f768563d95f398cacdc100c Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 16 May 2021 20:50:48 +0545 Subject: [PATCH 13/35] call setup --- tests/Audit/AuditTest.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/Audit/AuditTest.php b/tests/Audit/AuditTest.php index 20c33ee..e925e4a 100755 --- a/tests/Audit/AuditTest.php +++ b/tests/Audit/AuditTest.php @@ -20,7 +20,6 @@ use Utopia\Cache\Adapter\None as NoCache; use Utopia\Database\Adapter\MySQL; use Utopia\Database\Database; -use Utopia\Database\Validator\Authorization; class AuditTest extends TestCase { @@ -43,8 +42,7 @@ public function setUp(): void // Connection settings $pdo->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC); // Return arrays - $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // Handle all errors with exceptions - + $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // Handle all errors with exceptions $cache = new Cache(new NoCache()); @@ -52,6 +50,7 @@ public function setUp(): void $database->setNamespace('namespace'); $this->audit = new Audit($database); + $this->audit->setup(); } public function tearDown(): void From 21c3dafa51bea6a14038af2b719d2c4e75300180 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 16 May 2021 20:54:38 +0545 Subject: [PATCH 14/35] remove stale files --- data/schema.sql | 20 ----- src/Audit/Adapter.php | 111 --------------------------- src/Audit/Adapters/MySQL.php | 145 ----------------------------------- 3 files changed, 276 deletions(-) delete mode 100644 data/schema.sql delete mode 100644 src/Audit/Adapter.php delete mode 100644 src/Audit/Adapters/MySQL.php diff --git a/data/schema.sql b/data/schema.sql deleted file mode 100644 index 90bfa57..0000000 --- a/data/schema.sql +++ /dev/null @@ -1,20 +0,0 @@ -CREATE DATABASE audit; - -USE audit; - -CREATE TABLE IF NOT EXISTS `namespace.audit.audit` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `userId` varchar(45) NOT NULL, - `event` varchar(45) NOT NULL, - `resource` varchar(45) DEFAULT NULL, - `userAgent` text NOT NULL, - `ip` varchar(45) NOT NULL, - `location` varchar(45) DEFAULT NULL, - `time` datetime NOT NULL, - `data` longtext DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `id_UNIQUE` (`id`), - KEY `index_1` (`userId`), - KEY `index_2` (`event`), - KEY `index_3` (`resource`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; \ No newline at end of file diff --git a/src/Audit/Adapter.php b/src/Audit/Adapter.php deleted file mode 100644 index a29844a..0000000 --- a/src/Audit/Adapter.php +++ /dev/null @@ -1,111 +0,0 @@ -namespace = $namespace; - - return true; - } - - /** - * Get Namespace. - * - * Get namespace of current set scope - * - * @throws Exception - * - * @return string - */ - public function getNamespace(): string - { - if (empty($this->namespace)) { - throw new Exception('Missing namespace'); - } - - return $this->namespace; - } - - /** - * Log. - * - * Add specific event log - * - * @param string $userId - * @param string $event - * @param string $resource - * @param string $userAgent - * @param string $ip - * @param string $location - * @param array $data - * - * @return bool - */ - abstract public function log(string $userId, string $event, string $resource, string $userAgent, string $ip, string $location, array $data): bool; - - /** - * Get All Logs By User. - * - * Get all user logs - * - * @param string $userId - * - * @return array - */ - abstract public function getLogsByUser(string $userId): array; - - /** - * Get All Logs By Resource. - * - * @param string $resource - * - * @return array - */ - abstract public function getLogsByResource(string $resource): array; - - /** - * Get All Logs By User and Actions. - * - * Get all user logs by given action names - * - * @param string $userId - * @param array $actions - * - * @return array - */ - abstract public function getLogsByUserAndActions(string $userId, array $actions): array; - - /** - * Delete all logs older than $timestamp seconds - * - * @param int $timestamp - * - * @return bool - */ - abstract public function cleanup(int $timestamp): bool; -} diff --git a/src/Audit/Adapters/MySQL.php b/src/Audit/Adapters/MySQL.php deleted file mode 100644 index f794a03..0000000 --- a/src/Audit/Adapters/MySQL.php +++ /dev/null @@ -1,145 +0,0 @@ -pdo = $pdo; - } - - /** - * Log. - * - * Add specific event log - * - * @param string $userId - * @param string $event - * @param string $resource - * @param string $userAgent - * @param string $ip - * @param string $location - * @param array $data - * - * @return bool - * - * @throws \Exception - */ - public function log(string $userId, string $event, string $resource, string $userAgent, string $ip, string $location, array $data):bool - { - $st = $this->getPDO()->prepare('INSERT INTO `'.$this->getNamespace().'.audit.audit` - SET userId = :userId, event= :event, resource= :resource, userAgent = :userAgent, ip = :ip, location = :location, time = "'.\date('Y-m-d H:i:s').'", data = :data - '); - - $data = \mb_strcut(\json_encode($data), 0, 64000, 'UTF-8'); // Limit data to MySQL 64kb limit - - $st->bindValue(':userId', $userId, PDO::PARAM_STR); - $st->bindValue(':event', $event, PDO::PARAM_STR); - $st->bindValue(':resource', $resource, PDO::PARAM_STR); - $st->bindValue(':userAgent', $userAgent, PDO::PARAM_STR); - $st->bindValue(':ip', $ip, PDO::PARAM_STR); - $st->bindValue(':location', $location, PDO::PARAM_STR); - $st->bindValue(':data', $data, PDO::PARAM_STR); - - $response = $st->execute(); - - return $response == true ; - } - - public function getLogsByUser(string $userId):array - { - $st = $this->getPDO()->prepare('SELECT * - FROM `'.$this->getNamespace().'.audit.audit` - WHERE userId = :userId - ORDER BY `time` DESC LIMIT 10 - '); - - $st->bindValue(':userId', $userId, PDO::PARAM_STR); - - $st->execute(); - - return $st->fetchAll(); - } - - public function getLogsByResource(string $resource): array - { - $st = $this->getPDO()->prepare('SELECT * - FROM `'.$this->getNamespace().'.audit.audit` - WHERE resource = :resource - ORDER BY `time` DESC LIMIT 10 - '); - - $st->bindValue(':resource', $resource, PDO::PARAM_STR); - - $st->execute(); - - return $st->fetchAll(); - } - - public function getLogsByUserAndActions(string $userId, array $actions):array - { - $query = []; - - foreach ($actions as $k => $id) { - $query[] = ':action_'.$k; - } - - $query = \implode(',', $query); - - $st = $this->getPDO()->prepare('SELECT * - FROM `'.$this->getNamespace().'.audit.audit` - WHERE `event` IN ('.$query.') - AND userId = :userId - ORDER BY `time` DESC LIMIT 10 - '); - - $st->bindValue(':userId', $userId, PDO::PARAM_STR); - - foreach ($actions as $k => $id) { - $st->bindValue(':action_'.$k, $id); - } - - $st->execute(); - - return $st->fetchAll(); - } - - /** - * Delete logs older than $timestamp seconds - * - * @param int $timestamp - * - * @return bool - */ - public function cleanup(int $timestamp):bool - { - $st = $this->getPDO()->prepare('DELETE - FROM `'.$this->getNamespace().'.audit.audit` - WHERE UNIX_TIMESTAMP(`time`) < :timestamp'); - - $st->bindValue(':timestamp', $timestamp, PDO::PARAM_INT); - $response = $st->execute(); - - return $response == true; - } - - /** - * @return PDO - */ - protected function getPDO() - { - return $this->pdo; - } -} From aea7a53f55624406a232506351bf8552b778b0c3 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 16 May 2021 20:56:47 +0545 Subject: [PATCH 15/35] fix travis --- .travis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index fdab5c3..34f1eb2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,9 +12,6 @@ notifications: email: - team@appwrite.io -before_install: -- mysql < data/schema.sql - before_script: composer install --ignore-platform-reqs script: From d5f670b99c76fd90c5c063bffc06942664df7ea1 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 16 May 2021 20:59:37 +0545 Subject: [PATCH 16/35] fix connection issue --- tests/Audit/AuditTest.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/Audit/AuditTest.php b/tests/Audit/AuditTest.php index e925e4a..ef3831b 100755 --- a/tests/Audit/AuditTest.php +++ b/tests/Audit/AuditTest.php @@ -33,9 +33,8 @@ public function setUp(): void $dbHost = '127.0.0.1'; $dbUser = 'travis'; $dbPass = ''; - $dbName = 'audit'; - $pdo = new PDO("mysql:host={$dbHost};dbname={$dbName}", $dbUser, $dbPass, array( + $pdo = new PDO("mysql:host={$dbHost}", $dbUser, $dbPass, array( PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8', PDO::ATTR_TIMEOUT => 5 // Seconds )); From fbb243670af3c228a7f866f12c5322ab4a14db0e Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Mon, 17 May 2021 12:50:18 +0545 Subject: [PATCH 17/35] Update src/Audit/Audit.php Co-authored-by: Eldad A. Fux --- src/Audit/Audit.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Audit/Audit.php b/src/Audit/Audit.php index e4bdbd8..c54a81c 100644 --- a/src/Audit/Audit.php +++ b/src/Audit/Audit.php @@ -10,6 +10,7 @@ class Audit { const COLLECTION = "audit"; + /** * @var Database */ From 1bb07e0163fbed7c98977b0d8cf1238db5369cff Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Mon, 17 May 2021 12:51:36 +0545 Subject: [PATCH 18/35] updated readme example --- README.md | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e371814..0071a79 100644 --- a/README.md +++ b/README.md @@ -22,31 +22,36 @@ Init the audit object: require_once __DIR__ . '/../../vendor/autoload.php'; +use PDO; use PDO; use Utopia\Audit\Audit; -use Utopia\Audit\Adapters\MySQL; +use PHPUnit\Framework\TestCase; +use Utopia\Cache\Cache; +use Utopia\Cache\Adapter\None as NoCache; +use Utopia\Database\Adapter\MySQL; +use Utopia\Database\Database; + $dbHost = '127.0.0.1'; $dbUser = 'travis'; $dbPass = ''; -$dbName = 'audit'; -$pdo = new PDO("mysql:host={$dbHost};dbname={$dbName}", $dbUser, $dbPass, array( +$pdo = new PDO("mysql:host={$dbHost}", $dbUser, $dbPass, array( PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8', PDO::ATTR_TIMEOUT => 5 // Seconds )); // Connection settings $pdo->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC); // Return arrays -$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // Handle all errors with exceptions +$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // Handle all errors with exceptions -$adapter = new MySQL($pdo); +$cache = new Cache(new NoCache()); -$adapter - ->setNamespace('namespace') // DB table namespace -; +$database = new Database(new MySQL($pdo),$cache); +$database->setNamespace('namespace'); -$audit = new Audit($adapter); +$this->audit = new Audit($database); +$this->audit->setup(); ``` **Create Log** From b8f04e826126ed5b399bcdc1170d6a090f3545ad Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Mon, 17 May 2021 14:29:00 +0545 Subject: [PATCH 19/35] Apply suggestions from code review Co-authored-by: Eldad A. Fux --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0071a79..93023e2 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,6 @@ require_once __DIR__ . '/../../vendor/autoload.php'; use PDO; use PDO; use Utopia\Audit\Audit; -use PHPUnit\Framework\TestCase; use Utopia\Cache\Cache; use Utopia\Cache\Adapter\None as NoCache; use Utopia\Database\Adapter\MySQL; @@ -50,8 +49,8 @@ $cache = new Cache(new NoCache()); $database = new Database(new MySQL($pdo),$cache); $database->setNamespace('namespace'); -$this->audit = new Audit($database); -$this->audit->setup(); +$audit = new Audit($database); +$audit->setup(); ``` **Create Log** From 148e5aabd067accf7ddf632ba0568fb40e29e7ff Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Tue, 18 May 2021 11:13:32 +0545 Subject: [PATCH 20/35] update utopia-db version --- composer.json | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 0d07524..70b24df 100755 --- a/composer.json +++ b/composer.json @@ -17,16 +17,10 @@ "require": { "php": ">=7.4", "ext-pdo": "*", - "utopia-php/database": "dev-feat-new-doc-methods" + "utopia-php/database": "0.1.*" }, "require-dev": { "phpunit/phpunit": "^9.3", "vimeo/psalm": "4.0.1" - }, - "repositories": [ - { - "type": "git", - "url": "https://github.com/utopia-php/database" - } - ] + } } From 3421b6a54740fbb29570004848cdc0b818717e83 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Fri, 4 Jun 2021 14:26:19 +0545 Subject: [PATCH 21/35] update db dependency --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 70b24df..3ef7a75 100755 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "require": { "php": ">=7.4", "ext-pdo": "*", - "utopia-php/database": "0.1.*" + "utopia-php/database": "0.2.*" }, "require-dev": { "phpunit/phpunit": "^9.3", From b3b85524717bbf52cfe71f01474c4012bfd4323a Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Wed, 9 Jun 2021 14:55:27 +0545 Subject: [PATCH 22/35] fix setup script --- src/Audit/Audit.php | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/Audit/Audit.php b/src/Audit/Audit.php index c54a81c..1425154 100644 --- a/src/Audit/Audit.php +++ b/src/Audit/Audit.php @@ -28,22 +28,22 @@ public function setup(): void { if (!$this->db->exists()) { $this->db->create(); - $this->db->createCollection(Audit::COLLECTION); - $this->db->createAttribute(Audit::COLLECTION, 'userId', Database::VAR_STRING, Database::LENGTH_KEY, true); - $this->db->createAttribute(Audit::COLLECTION, 'event', Database::VAR_STRING, 255, true); - $this->db->createAttribute(Audit::COLLECTION, 'resource', Database::VAR_STRING, 255, false); - $this->db->createAttribute(Audit::COLLECTION, 'userAgent', Database::VAR_STRING, 65534, true); - $this->db->createAttribute(Audit::COLLECTION, 'ip', Database::VAR_STRING, 45, true); - $this->db->createAttribute(Audit::COLLECTION, 'location', Database::VAR_STRING, 45, false); - $this->db->createAttribute(Audit::COLLECTION, 'time', Database::VAR_INTEGER, 0, true, false); - $this->db->createAttribute(Audit::COLLECTION, 'data', Database::VAR_STRING, 16777216, false, true, false, ['json']); + } + $this->db->createCollection(Audit::COLLECTION); + $this->db->createAttribute(Audit::COLLECTION, 'userId', Database::VAR_STRING, Database::LENGTH_KEY, true); + $this->db->createAttribute(Audit::COLLECTION, 'event', Database::VAR_STRING, 255, true); + $this->db->createAttribute(Audit::COLLECTION, 'resource', Database::VAR_STRING, 255, false); + $this->db->createAttribute(Audit::COLLECTION, 'userAgent', Database::VAR_STRING, 65534, true); + $this->db->createAttribute(Audit::COLLECTION, 'ip', Database::VAR_STRING, 45, true); + $this->db->createAttribute(Audit::COLLECTION, 'location', Database::VAR_STRING, 45, false); + $this->db->createAttribute(Audit::COLLECTION, 'time', Database::VAR_INTEGER, 0, true, false); + $this->db->createAttribute(Audit::COLLECTION, 'data', Database::VAR_STRING, 16777216, false, true, false, ['json']); - $this->db->createIndex(Audit::COLLECTION, 'index_1', Database::INDEX_KEY, ['userId']); - $this->db->createIndex(Audit::COLLECTION, 'index_2', Database::INDEX_KEY, ['event']); - $this->db->createIndex(Audit::COLLECTION, 'index_3', Database::INDEX_KEY, ['resource']); - $this->db->createIndex(Audit::COLLECTION, 'index_4', Database::INDEX_KEY, ['userId', 'event']); + $this->db->createIndex(Audit::COLLECTION, 'index_1', Database::INDEX_KEY, ['userId']); + $this->db->createIndex(Audit::COLLECTION, 'index_2', Database::INDEX_KEY, ['event']); + $this->db->createIndex(Audit::COLLECTION, 'index_3', Database::INDEX_KEY, ['resource']); + $this->db->createIndex(Audit::COLLECTION, 'index_4', Database::INDEX_KEY, ['userId', 'event']); - } } /** From 4e51c7d618766fe8ef3887040797f78080008cf9 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Thu, 10 Jun 2021 13:46:55 +0545 Subject: [PATCH 23/35] fix errors --- composer.json | 2 +- src/Audit/Audit.php | 5 +++-- tests/Audit/AuditTest.php | 7 ++++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 3ef7a75..4f87cba 100755 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "require": { "php": ">=7.4", "ext-pdo": "*", - "utopia-php/database": "0.2.*" + "utopia-php/database": "0.3.*" }, "require-dev": { "phpunit/phpunit": "^9.3", diff --git a/src/Audit/Audit.php b/src/Audit/Audit.php index 1425154..75127a4 100644 --- a/src/Audit/Audit.php +++ b/src/Audit/Audit.php @@ -6,6 +6,7 @@ use Utopia\Database\Document; use Utopia\Database\Query; use Utopia\Database\Validator\Authorization; +use Utopia\Exception; class Audit { @@ -27,8 +28,8 @@ public function __construct(Database $db) public function setup(): void { if (!$this->db->exists()) { - $this->db->create(); - } + throw new Exception("You need to create the databse before running Audit setup"); + } $this->db->createCollection(Audit::COLLECTION); $this->db->createAttribute(Audit::COLLECTION, 'userId', Database::VAR_STRING, Database::LENGTH_KEY, true); $this->db->createAttribute(Audit::COLLECTION, 'event', Database::VAR_STRING, 255, true); diff --git a/tests/Audit/AuditTest.php b/tests/Audit/AuditTest.php index ef3831b..4e3e196 100755 --- a/tests/Audit/AuditTest.php +++ b/tests/Audit/AuditTest.php @@ -27,6 +27,7 @@ class AuditTest extends TestCase * @var Audit */ protected $audit = null; + protected $initialized = false; public function setUp(): void { @@ -49,7 +50,11 @@ public function setUp(): void $database->setNamespace('namespace'); $this->audit = new Audit($database); - $this->audit->setup(); + if(!$this->initialized) { + $database->create(); + $this->audit->setup(); + $this->initialized = true; + } } public function tearDown(): void From ef2cb0f02d3e3fe595d49f76ccfbc78c9d68a9a9 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Thu, 10 Jun 2021 13:53:51 +0545 Subject: [PATCH 24/35] improve cleanup method --- src/Audit/Audit.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/Audit/Audit.php b/src/Audit/Audit.php index 75127a4..6cda478 100644 --- a/src/Audit/Audit.php +++ b/src/Audit/Audit.php @@ -146,13 +146,15 @@ public function getLogsByUserAndActions(string $userId, array $events): array public function cleanup(int $timestamp): bool { Authorization::disable(); - $documents = $this->db->find(Audit::COLLECTION, [ - new Query('time', Query::TYPE_LESSER, [$timestamp]), - ]); - - foreach ($documents as $document) { - $this->db->deleteDocument(Audit::COLLECTION, $document['$id']); - } + do { + $documents = $this->db->find(Audit::COLLECTION, [ + new Query('time', Query::TYPE_LESSER, [$timestamp]), + ]); + + foreach ($documents as $document) { + $this->db->deleteDocument(Audit::COLLECTION, $document['$id']); + } + } while(\count($documents) > 0); Authorization::reset(); return true; } From 1bf55a8898738d4ff0f0214a38b68d3521a7b064 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Thu, 10 Jun 2021 15:41:32 +0545 Subject: [PATCH 25/35] remove extra space --- tests/Audit/AuditTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/Audit/AuditTest.php b/tests/Audit/AuditTest.php index 4e3e196..3174b76 100755 --- a/tests/Audit/AuditTest.php +++ b/tests/Audit/AuditTest.php @@ -39,16 +39,16 @@ public function setUp(): void PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8', PDO::ATTR_TIMEOUT => 5 // Seconds )); - + // Connection settings $pdo->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC); // Return arrays $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // Handle all errors with exceptions - + $cache = new Cache(new NoCache()); - + $database = new Database(new MySQL($pdo),$cache); $database->setNamespace('namespace'); - + $this->audit = new Audit($database); if(!$this->initialized) { $database->create(); From db1d23615547a92b359bea417aaa9e49cfbfddd4 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Thu, 10 Jun 2021 16:22:16 +0545 Subject: [PATCH 26/35] fix setup --- src/Audit/Audit.php | 8 ++++---- tests/Audit/AuditTest.php | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Audit/Audit.php b/src/Audit/Audit.php index 6cda478..9ebdbf9 100644 --- a/src/Audit/Audit.php +++ b/src/Audit/Audit.php @@ -40,10 +40,10 @@ public function setup(): void $this->db->createAttribute(Audit::COLLECTION, 'time', Database::VAR_INTEGER, 0, true, false); $this->db->createAttribute(Audit::COLLECTION, 'data', Database::VAR_STRING, 16777216, false, true, false, ['json']); - $this->db->createIndex(Audit::COLLECTION, 'index_1', Database::INDEX_KEY, ['userId']); - $this->db->createIndex(Audit::COLLECTION, 'index_2', Database::INDEX_KEY, ['event']); - $this->db->createIndex(Audit::COLLECTION, 'index_3', Database::INDEX_KEY, ['resource']); - $this->db->createIndex(Audit::COLLECTION, 'index_4', Database::INDEX_KEY, ['userId', 'event']); + $this->db->createIndex(Audit::COLLECTION, 'index1', Database::INDEX_KEY, ['userId']); + $this->db->createIndex(Audit::COLLECTION, 'index2', Database::INDEX_KEY, ['event']); + $this->db->createIndex(Audit::COLLECTION, 'index3', Database::INDEX_KEY, ['resource']); + $this->db->createIndex(Audit::COLLECTION, 'index4', Database::INDEX_KEY, ['userId', 'event']); } diff --git a/tests/Audit/AuditTest.php b/tests/Audit/AuditTest.php index 3174b76..4652f9b 100755 --- a/tests/Audit/AuditTest.php +++ b/tests/Audit/AuditTest.php @@ -50,10 +50,9 @@ public function setUp(): void $database->setNamespace('namespace'); $this->audit = new Audit($database); - if(!$this->initialized) { + if(!$database->exists()) { $database->create(); $this->audit->setup(); - $this->initialized = true; } } From 6a3a3cc60e9240f2e8997755b4b8e0f9b8c557aa Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Thu, 10 Jun 2021 16:50:17 +0545 Subject: [PATCH 27/35] fix cleanup --- src/Audit/Audit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Audit/Audit.php b/src/Audit/Audit.php index 9ebdbf9..5591e42 100644 --- a/src/Audit/Audit.php +++ b/src/Audit/Audit.php @@ -154,7 +154,7 @@ public function cleanup(int $timestamp): bool foreach ($documents as $document) { $this->db->deleteDocument(Audit::COLLECTION, $document['$id']); } - } while(\count($documents) > 0); + } while(!empty($documents)); Authorization::reset(); return true; } From b3ca9fa928fdec8c966596cbd85ee1141c79b6eb Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 13 Jun 2021 13:26:15 +0545 Subject: [PATCH 28/35] order queries by _id descending --- src/Audit/Audit.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Audit/Audit.php b/src/Audit/Audit.php index 5591e42..6e32a47 100644 --- a/src/Audit/Audit.php +++ b/src/Audit/Audit.php @@ -93,7 +93,7 @@ public function getLogsByUser(string $userId): array Authorization::disable(); $result = $this->db->find(Audit::COLLECTION, [ new Query('userId', Query::TYPE_EQUAL, [$userId]), - ]); + ], 25, 0, ['_id'], ['DESC']); Authorization::reset(); return $result; } @@ -110,7 +110,7 @@ public function getLogsByResource(string $resource): array Authorization::disable(); $results = $this->db->find(Audit::COLLECTION, [ new Query('resource', Query::TYPE_EQUAL, [$resource]), - ]); + ], 25, 0, ['_id'], ['DESC']); Authorization::reset(); return $results; } @@ -131,7 +131,7 @@ public function getLogsByUserAndActions(string $userId, array $events): array $results = $this->db->find(Audit::COLLECTION, [ new Query('userId', Query::TYPE_EQUAL, [$userId]), new Query('event', Query::TYPE_EQUAL, $events), - ]); + ], 25, 0, ['_id'], ['DESC']); Authorization::reset(); return $results; } From d5591321161b81043c45be3c53ce9dcfa2d81d72 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Mon, 14 Jun 2021 13:23:18 +0545 Subject: [PATCH 29/35] rename function --- src/Audit/Audit.php | 2 +- tests/Audit/AuditTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Audit/Audit.php b/src/Audit/Audit.php index 6e32a47..039c31f 100644 --- a/src/Audit/Audit.php +++ b/src/Audit/Audit.php @@ -125,7 +125,7 @@ public function getLogsByResource(string $resource): array * * @return array */ - public function getLogsByUserAndActions(string $userId, array $events): array + public function getLogsByUserAndEvents(string $userId, array $events): array { Authorization::disable(); $results = $this->db->find(Audit::COLLECTION, [ diff --git a/tests/Audit/AuditTest.php b/tests/Audit/AuditTest.php index 4652f9b..8dc5ba4 100755 --- a/tests/Audit/AuditTest.php +++ b/tests/Audit/AuditTest.php @@ -82,8 +82,8 @@ public function testGetLogsByUser() public function testGetLogsByUserAndAction() { - $logs1 = $this->audit->getLogsByUserAndActions('userId', ['update']); - $logs2 = $this->audit->getLogsByUserAndActions('userId', ['update', 'delete']); + $logs1 = $this->audit->getLogsByUserAndEvents('userId', ['update']); + $logs2 = $this->audit->getLogsByUserAndEvents('userId', ['update', 'delete']); $this->assertEquals(2, \count($logs1)); $this->assertEquals(3, \count($logs2)); From 467f5957d324e8d160d44fe745ae59961bd155af Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Fri, 18 Jun 2021 12:00:28 +0545 Subject: [PATCH 30/35] audit test using docker --- .travis.yml | 27 ++++++++++++++++++--------- Dockerfile-php7 | 27 +++++++++++++++++++++++++++ Dockerfile-php8 | 27 +++++++++++++++++++++++++++ docker-compose.yml | 30 ++++++++++++++++++++++++++++++ tests/Audit/AuditTest.php | 18 +++++++++++------- 5 files changed, 113 insertions(+), 16 deletions(-) create mode 100644 Dockerfile-php7 create mode 100644 Dockerfile-php8 create mode 100644 docker-compose.yml diff --git a/.travis.yml b/.travis.yml index 34f1eb2..b398118 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,19 +1,28 @@ -language: php +dist: xenial -php: -- 7.4 -- 8.0 -- nightly +arch: + - amd64 + +os: linux + +language: shell services: -- mysql +- docker notifications: email: - team@appwrite.io -before_script: composer install --ignore-platform-reqs +before_script: docker run --rm --interactive --tty --volume "$(pwd)":/app composer update --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist + +install: +- docker-compose up -d +- sleep 10 script: -- vendor/bin/phpunit --configuration phpunit.xml -- vendor/bin/psalm --show-info=true +- docker ps +- docker-compose exec php7.4 vendor/bin/phpunit --configuration phpunit.xml tests +- docker-compose exec php7.4 vendor/bin/psalm --show-info=true +- docker-compose exec php8 vendor/bin/phpunit --configuration phpunit.xml tests +- docker-compose exec php8 vendor/bin/psalm --show-info=true diff --git a/Dockerfile-php7 b/Dockerfile-php7 new file mode 100644 index 0000000..b7b776d --- /dev/null +++ b/Dockerfile-php7 @@ -0,0 +1,27 @@ +FROM composer:2.0 as step0 + +WORKDIR /src/ + +COPY ./composer.json /src/ +COPY ./composer.lock /src/ + +RUN composer update --ignore-platform-reqs --optimize-autoloader \ + --no-plugins --no-scripts --prefer-dist + +FROM php:7.4-cli-alpine as final + +LABEL maintainer="team@appwrite.io" + +RUN docker-php-ext-install pdo_mysql + +WORKDIR /code + +COPY --from=step0 /src/vendor /code/vendor + +# Add Source Code +COPY ./tests /code/tests +COPY ./src /code/src +COPY ./phpunit.xml /code/phpunit.xml +COPY ./psalm.xml /code/psalm.xml + +CMD [ "tail", "-f", "/dev/null" ] diff --git a/Dockerfile-php8 b/Dockerfile-php8 new file mode 100644 index 0000000..8b81833 --- /dev/null +++ b/Dockerfile-php8 @@ -0,0 +1,27 @@ +FROM composer:2.0 as step0 + +WORKDIR /src/ + +COPY composer.lock /src/ +COPY composer.json /src/ + +RUN composer update --ignore-platform-reqs --optimize-autoloader \ + --no-plugins --no-scripts --prefer-dist + +FROM php:8.0-cli-alpine as final + +LABEL maintainer="team@appwrite.io" + +RUN docker-php-ext-install pdo_mysql + +WORKDIR /code + +COPY --from=step0 /src/vendor /code/vendor + +# Add Source Code +COPY ./tests /code/tests +COPY ./src /code/src +COPY ./phpunit.xml /code/phpunit.xml +COPY ./psalm.xml /code/psalm.xml + +CMD [ "tail", "-f", "/dev/null" ] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..7879048 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,30 @@ +version: '3' + +services: + mysql: + image: mysql:8 + environment: + - MYSQL_ROOT_PASSWORD=password + networks: + - abuse + + php7.4: + build: + context: . + dockerfile: ./Dockerfile-php7 + networks: + - abuse + depends_on: + - mysql + + php8: + build: + context: . + dockerfile: ./Dockerfile-php8 + networks: + - abuse + depends_on: + - mysql + +networks: + abuse: \ No newline at end of file diff --git a/tests/Audit/AuditTest.php b/tests/Audit/AuditTest.php index 8dc5ba4..7065a56 100755 --- a/tests/Audit/AuditTest.php +++ b/tests/Audit/AuditTest.php @@ -31,13 +31,16 @@ class AuditTest extends TestCase public function setUp(): void { - $dbHost = '127.0.0.1'; - $dbUser = 'travis'; - $dbPass = ''; - - $pdo = new PDO("mysql:host={$dbHost}", $dbUser, $dbPass, array( - PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8', - PDO::ATTR_TIMEOUT => 5 // Seconds + $dbHost = 'mysql'; + $dbUser = 'root'; + $dbPort = '3306'; + $dbUser = 'root'; + $dbPass = 'password'; + + $pdo = new PDO("mysql:host={$dbHost};port={$dbPort};charset=utf8mb4", $dbUser, $dbPass, array( + PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4', + PDO::ATTR_TIMEOUT => 3, // Seconds + PDO::ATTR_PERSISTENT => true )); // Connection settings @@ -58,6 +61,7 @@ public function setUp(): void public function tearDown(): void { + $this->audit->cleanup(time()); $this->audit = null; } From 063c1d527776c85d0ab6d8ffcde694f7813170a6 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Fri, 18 Jun 2021 12:04:19 +0545 Subject: [PATCH 31/35] composer lock --- .gitignore | 1 - composer.lock | 4060 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 4060 insertions(+), 1 deletion(-) create mode 100644 composer.lock diff --git a/.gitignore b/.gitignore index 8924c80..e244eda 100755 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ -composer.lock /vendor/ /.idea/ \ No newline at end of file diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..a444a93 --- /dev/null +++ b/composer.lock @@ -0,0 +1,4060 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "526d238cdfe58bd52cf433794d207a25", + "packages": [ + { + "name": "composer/package-versions-deprecated", + "version": "1.11.99.2", + "source": { + "type": "git", + "url": "https://github.com/composer/package-versions-deprecated.git", + "reference": "c6522afe5540d5fc46675043d3ed5a45a740b27c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/c6522afe5540d5fc46675043d3ed5a45a740b27c", + "reference": "c6522afe5540d5fc46675043d3ed5a45a740b27c", + "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)", + "support": { + "issues": "https://github.com/composer/package-versions-deprecated/issues", + "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.2" + }, + "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": "2021-05-24T07:46:03+00:00" + }, + { + "name": "jean85/pretty-package-versions", + "version": "1.6.0", + "source": { + "type": "git", + "url": "https://github.com/Jean85/pretty-package-versions.git", + "reference": "1e0104b46f045868f11942aea058cd7186d6c303" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/1e0104b46f045868f11942aea058cd7186d6c303", + "reference": "1e0104b46f045868f11942aea058cd7186d6c303", + "shasum": "" + }, + "require": { + "composer/package-versions-deprecated": "^1.8.0", + "php": "^7.0|^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0|^8.5|^9.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Jean85\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alessandro Lai", + "email": "alessandro.lai85@gmail.com" + } + ], + "description": "A wrapper for ocramius/package-versions to get pretty versions strings", + "keywords": [ + "composer", + "package", + "release", + "versions" + ], + "support": { + "issues": "https://github.com/Jean85/pretty-package-versions/issues", + "source": "https://github.com/Jean85/pretty-package-versions/tree/1.6.0" + }, + "time": "2021-02-04T16:20:16+00:00" + }, + { + "name": "mongodb/mongodb", + "version": "1.8.0", + "source": { + "type": "git", + "url": "https://github.com/mongodb/mongo-php-library.git", + "reference": "953dbc19443aa9314c44b7217a16873347e6840d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/953dbc19443aa9314c44b7217a16873347e6840d", + "reference": "953dbc19443aa9314c44b7217a16873347e6840d", + "shasum": "" + }, + "require": { + "ext-hash": "*", + "ext-json": "*", + "ext-mongodb": "^1.8.1", + "jean85/pretty-package-versions": "^1.2", + "php": "^7.0 || ^8.0", + "symfony/polyfill-php80": "^1.19" + }, + "require-dev": { + "squizlabs/php_codesniffer": "^3.5, <3.5.5", + "symfony/phpunit-bridge": "5.x-dev" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8.x-dev" + } + }, + "autoload": { + "psr-4": { + "MongoDB\\": "src/" + }, + "files": [ + "src/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Andreas Braun", + "email": "andreas.braun@mongodb.com" + }, + { + "name": "Jeremy Mikola", + "email": "jmikola@gmail.com" + } + ], + "description": "MongoDB driver library", + "homepage": "https://jira.mongodb.org/browse/PHPLIB", + "keywords": [ + "database", + "driver", + "mongodb", + "persistence" + ], + "support": { + "issues": "https://github.com/mongodb/mongo-php-library/issues", + "source": "https://github.com/mongodb/mongo-php-library/tree/1.8.0" + }, + "time": "2020-11-25T12:26:02+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.23.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/eca0bf41ed421bed1b57c4958bab16aa86b757d0", + "reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-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" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.0" + }, + "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": "2021-02-19T12:13:01+00:00" + }, + { + "name": "utopia-php/cache", + "version": "0.4.1", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/cache.git", + "reference": "8c48eff73219c8c1ac2807909f0a38f3480c8938" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/cache/zipball/8c48eff73219c8c1ac2807909f0a38f3480c8938", + "reference": "8c48eff73219c8c1ac2807909f0a38f3480c8938", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-redis": "*", + "php": ">=7.4" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Cache\\": "src/Cache" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + } + ], + "description": "A simple cache library to manage application cache storing, loading and purging", + "keywords": [ + "cache", + "framework", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/cache/issues", + "source": "https://github.com/utopia-php/cache/tree/0.4.1" + }, + "time": "2021-04-29T18:41:43+00:00" + }, + { + "name": "utopia-php/database", + "version": "0.3.2", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/database.git", + "reference": "8e56a2d399d17b2497c8ee0f8bf429ac2da90c56" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/database/zipball/8e56a2d399d17b2497c8ee0f8bf429ac2da90c56", + "reference": "8e56a2d399d17b2497c8ee0f8bf429ac2da90c56", + "shasum": "" + }, + "require": { + "ext-mongodb": "*", + "ext-pdo": "*", + "ext-redis": "*", + "mongodb/mongodb": "1.8.0", + "php": ">=7.1", + "utopia-php/cache": "0.4.*", + "utopia-php/framework": "0.*.*" + }, + "require-dev": { + "fakerphp/faker": "^1.14", + "phpunit/phpunit": "^9.4", + "utopia-php/cli": "^0.11.0", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\Database\\": "src/Database" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + }, + { + "name": "Brandon Leckemby", + "email": "brandon@appwrite.io" + } + ], + "description": "A simple library to manage application persistency using multiple database adapters", + "keywords": [ + "database", + "framework", + "php", + "upf", + "utopia" + ], + "support": { + "issues": "https://github.com/utopia-php/database/issues", + "source": "https://github.com/utopia-php/database/tree/0.3.2" + }, + "time": "2021-06-12T18:26:26+00:00" + }, + { + "name": "utopia-php/framework", + "version": "0.14.1", + "source": { + "type": "git", + "url": "https://github.com/utopia-php/framework.git", + "reference": "632113288bebe41cbef79f0d355bd91609767b8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/utopia-php/framework/zipball/632113288bebe41cbef79f0d355bd91609767b8c", + "reference": "632113288bebe41cbef79f0d355bd91609767b8c", + "shasum": "" + }, + "require": { + "php": ">=7.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.4", + "vimeo/psalm": "4.0.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Utopia\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eldad Fux", + "email": "eldad@appwrite.io" + } + ], + "description": "A simple, light and advanced PHP framework", + "keywords": [ + "framework", + "php", + "upf" + ], + "support": { + "issues": "https://github.com/utopia-php/framework/issues", + "source": "https://github.com/utopia-php/framework/tree/0.14.1" + }, + "time": "2021-05-21T06:41:45+00:00" + } + ], + "packages-dev": [ + { + "name": "amphp/amp", + "version": "v2.5.2", + "source": { + "type": "git", + "url": "https://github.com/amphp/amp.git", + "reference": "efca2b32a7580087adb8aabbff6be1dc1bb924a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/amp/zipball/efca2b32a7580087adb8aabbff6be1dc1bb924a9", + "reference": "efca2b32a7580087adb8aabbff6be1dc1bb924a9", + "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" + ], + "support": { + "irc": "irc://irc.freenode.org/amphp", + "issues": "https://github.com/amphp/amp/issues", + "source": "https://github.com/amphp/amp/tree/v2.5.2" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2021-01-10T17:06:37+00:00" + }, + { + "name": "amphp/byte-stream", + "version": "v1.8.1", + "source": { + "type": "git", + "url": "https://github.com/amphp/byte-stream.git", + "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/byte-stream/zipball/acbd8002b3536485c997c4e019206b3f10ca15bd", + "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd", + "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" + ], + "support": { + "irc": "irc://irc.freenode.org/amphp", + "issues": "https://github.com/amphp/byte-stream/issues", + "source": "https://github.com/amphp/byte-stream/tree/v1.8.1" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2021-03-30T17:13:30+00:00" + }, + { + "name": "composer/semver", + "version": "3.2.5", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/31f3ea725711245195f62e54ffa402d8ef2fdba9", + "reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.54", + "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" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.2.5" + }, + "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": "2021-05-24T12:41:47+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "1.4.6", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "f27e06cd9675801df441b3656569b328e04aa37c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/f27e06cd9675801df441b3656569b328e04aa37c", + "reference": "f27e06cd9675801df441b3656569b328e04aa37c", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0", + "psr/log": "^1.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.55", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "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" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/1.4.6" + }, + "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": "2021-03-25T17:01:18+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", + "support": { + "issues": "https://github.com/dnoegel/php-xdg-base-dir/issues", + "source": "https://github.com/dnoegel/php-xdg-base-dir/tree/v0.1.1" + }, + "time": "2019-12-04T15:06:13+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^8.0", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2020-11-10T18:47:58+00:00" + }, + { + "name": "felixfbecker/advanced-json-rpc", + "version": "v3.2.1", + "source": { + "type": "git", + "url": "https://github.com/felixfbecker/php-advanced-json-rpc.git", + "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/b5f37dbff9a8ad360ca341f3240dc1c168b45447", + "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447", + "shasum": "" + }, + "require": { + "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", + "php": "^7.1 || ^8.0", + "phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0" + }, + "require-dev": { + "phpunit/phpunit": "^7.0 || ^8.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", + "support": { + "issues": "https://github.com/felixfbecker/php-advanced-json-rpc/issues", + "source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/v3.2.1" + }, + "time": "2021-06-11T22:34:44+00:00" + }, + { + "name": "felixfbecker/language-server-protocol", + "version": "1.5.1", + "source": { + "type": "git", + "url": "https://github.com/felixfbecker/php-language-server-protocol.git", + "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/9d846d1f5cf101deee7a61c8ba7caa0a975cd730", + "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730", + "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" + ], + "support": { + "issues": "https://github.com/felixfbecker/php-language-server-protocol/issues", + "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/1.5.1" + }, + "time": "2021-02-22T14:02:09+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.10.2", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "replace": { + "myclabs/deep-copy": "self.version" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2020-11-13T09:40:50+00:00" + }, + { + "name": "netresearch/jsonmapper", + "version": "v3.1.1", + "source": { + "type": "git", + "url": "https://github.com/cweiske/jsonmapper.git", + "reference": "ba09f0e456d4f00cef84e012da5715625594407c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/ba09f0e456d4f00cef84e012da5715625594407c", + "reference": "ba09f0e456d4f00cef84e012da5715625594407c", + "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", + "support": { + "email": "cweiske@cweiske.de", + "issues": "https://github.com/cweiske/jsonmapper/issues", + "source": "https://github.com/cweiske/jsonmapper/tree/v3.1.1" + }, + "time": "2020-11-02T19:19:54+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.10.5", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "4432ba399e47c66624bc73c8c0f811e5c109576f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4432ba399e47c66624bc73c8c0f811e5c109576f", + "reference": "4432ba399e47c66624bc73c8c0f811e5c109576f", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.10.5" + }, + "time": "2021-05-03T19:11:20+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" + ], + "support": { + "issues": "https://github.com/nullivex/lib-array2xml/issues", + "source": "https://github.com/nullivex/lib-array2xml/tree/master" + }, + "time": "2019-03-29T20:06:56+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", + "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/master" + }, + "time": "2020-06-27T14:33:11+00:00" + }, + { + "name": "phar-io/version", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "bae7c545bef187884426f042434e561ab1ddb182" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", + "reference": "bae7c545bef187884426f042434e561ab1ddb182", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.1.0" + }, + "time": "2021-02-23T14:00:09+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "5.2.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" + }, + "require-dev": { + "mockery/mockery": "~1.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" + }, + "time": "2020-09-03T19:13:55+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" + }, + "time": "2020-09-17T18:55:26+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "1.13.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea", + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.2", + "php": "^7.2 || ~8.0, <8.1", + "phpdocumentor/reflection-docblock": "^5.2", + "sebastian/comparator": "^3.0 || ^4.0", + "sebastian/recursion-context": "^3.0 || ^4.0" + }, + "require-dev": { + "phpspec/phpspec": "^6.0", + "phpunit/phpunit": "^8.0 || ^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.11.x-dev" + } + }, + "autoload": { + "psr-4": { + "Prophecy\\": "src/Prophecy" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/1.13.0" + }, + "time": "2021-03-17T13:42:18+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "9.2.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "f6293e1b30a2354e8428e004689671b83871edde" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f6293e1b30a2354e8428e004689671b83871edde", + "reference": "f6293e1b30a2354e8428e004689671b83871edde", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.10.2", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcov": "*", + "ext-xdebug": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-03-28T07:26:59+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "3.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8", + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:57:25+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T05:33:50+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:16:10+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "9.5.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "89ff45ea9d70e35522fb6654a2ebc221158de276" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/89ff45ea9d70e35522fb6654a2ebc221158de276", + "reference": "89ff45ea9d70e35522fb6654a2ebc221158de276", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.3.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.1", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpspec/prophecy": "^1.12.1", + "phpunit/php-code-coverage": "^9.2.3", + "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.2", + "sebastian/version": "^3.0.2" + }, + "require-dev": { + "ext-pdo": "*", + "phpspec/prophecy-phpunit": "^2.0.1" + }, + "suggest": { + "ext-soap": "*", + "ext-xdebug": "*" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.5-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ], + "files": [ + "src/Framework/Assert/Functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.5" + }, + "funding": [ + { + "url": "https://phpunit.de/donate.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-06-05T04:49:07+00:00" + }, + { + "name": "psr/container", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "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" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/1.1.1" + }, + "time": "2021-03-05T17:36:06+00:00" + }, + { + "name": "psr/log", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.4" + }, + "time": "2021-05-03T11:20:27+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:08:49+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" + }, + { + "name": "sebastian/comparator", + "version": "4.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:49:45+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.7", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:52:27+00:00" + }, + { + "name": "sebastian/diff", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:10:38+00:00" + }, + { + "name": "sebastian/environment", + "version": "5.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "388b6ced16caa751030f6a69e588299fa09200ac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", + "reference": "388b6ced16caa751030f6a69e588299fa09200ac", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:52:38+00:00" + }, + { + "name": "sebastian/exporter", + "version": "4.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:24:23+00:00" + }, + { + "name": "sebastian/global-state", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-06-11T13:31:12+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.6", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-28T06:42:11+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:12:34+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:14:26+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:17:30+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:45:17+00:00" + }, + { + "name": "sebastian/type", + "version": "2.3.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-06-15T12:49:02+00:00" + }, + { + "name": "sebastian/version", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" + }, + { + "name": "symfony/console", + "version": "v5.3.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "649730483885ff2ca99ca0560ef0e5f6b03f2ac1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/649730483885ff2ca99ca0560ef0e5f6b03f2ac1", + "reference": "649730483885ff2ca99ca0560ef0e5f6b03f2ac1", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "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": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v5.3.2" + }, + "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": "2021-06-12T09:42:48+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v2.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627", + "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.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": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.4.0" + }, + "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": "2021-03-23T23:28:01+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.23.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" + }, + "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": "2021-02-19T12:13:01+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.23.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "24b72c6baa32c746a4d0840147c9715e42bb68ab" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/24b72c6baa32c746a4d0840147c9715e42bb68ab", + "reference": "24b72c6baa32c746a4d0840147c9715e42bb68ab", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-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" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.23.0" + }, + "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": "2021-05-27T09:17:38+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.23.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-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" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.0" + }, + "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": "2021-02-19T12:13:01+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.23.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2df51500adbaebdc4c38dea4c89a2e131c45c8a1", + "reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "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 the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.0" + }, + "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": "2021-05-27T09:27:20+00:00" + }, + { + "name": "symfony/polyfill-php73", + "version": "v1.23.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010", + "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-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" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php73/tree/v1.23.0" + }, + "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": "2021-02-19T12:13:01+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v2.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", + "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/container": "^1.1" + }, + "suggest": { + "symfony/service-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.4-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" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v2.4.0" + }, + "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": "2021-04-01T10:43:52+00:00" + }, + { + "name": "symfony/string", + "version": "v5.3.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "0732e97e41c0a590f77e231afc16a327375d50b0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/0732e97e41c0a590f77e231afc16a327375d50b0", + "reference": "0732e97e41c0a590f77e231afc16a327375d50b0", + "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": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v5.3.2" + }, + "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": "2021-06-06T09:51:56+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "75a63c33a8577608444246075ea0af0d052e452a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a", + "reference": "75a63c33a8577608444246075ea0af0d052e452a", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/master" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2020-07-12T23:59:07+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" + ], + "support": { + "issues": "https://github.com/vimeo/psalm/issues", + "source": "https://github.com/vimeo/psalm/tree/4.0.1" + }, + "time": "2020-10-20T13:40:17+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.9.1", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", + "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0 || ^8.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<3.9.1" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36 || ^7.5.13" + }, + "type": "library", + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.9.1" + }, + "time": "2020-07-08T17:02:28+00:00" + }, + { + "name": "webmozart/glob", + "version": "4.3.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/glob.git", + "reference": "06358fafde0f32edb4513f4fd88fe113a40c90ee" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/glob/zipball/06358fafde0f32edb4513f4fd88fe113a40c90ee", + "reference": "06358fafde0f32edb4513f4fd88fe113a40c90ee", + "shasum": "" + }, + "require": { + "php": "^7.3 || ^8.0.0", + "webmozart/path-util": "^2.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.0", + "symfony/filesystem": "^5.1" + }, + "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.", + "support": { + "issues": "https://github.com/webmozarts/glob/issues", + "source": "https://github.com/webmozarts/glob/tree/4.3.0" + }, + "time": "2021-01-21T06:17:15+00:00" + }, + { + "name": "webmozart/path-util", + "version": "2.3.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/path-util.git", + "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/path-util/zipball/d939f7edc24c9a1bb9c0dee5cb05d8e859490725", + "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "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.", + "support": { + "issues": "https://github.com/webmozart/path-util/issues", + "source": "https://github.com/webmozart/path-util/tree/2.3.0" + }, + "time": "2015-12-17T08:42:14+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=7.4", + "ext-pdo": "*" + }, + "platform-dev": [], + "plugin-api-version": "2.1.0" +} From 45b51a28514706c4d3a5105c72e0d3e636d91abc Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 4 Jul 2021 11:16:30 +0545 Subject: [PATCH 32/35] update db lib --- composer.json | 2 +- composer.lock | 52 +++++++++++++++++++++++++-------------------------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/composer.json b/composer.json index 4f87cba..eefea74 100755 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "require": { "php": ">=7.4", "ext-pdo": "*", - "utopia-php/database": "0.3.*" + "utopia-php/database": "0.5.*" }, "require-dev": { "phpunit/phpunit": "^9.3", diff --git a/composer.lock b/composer.lock index a444a93..eed8aea 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": "526d238cdfe58bd52cf433794d207a25", + "content-hash": "72d1a4321dbebe4f717caac605a372f3", "packages": [ { "name": "composer/package-versions-deprecated", @@ -340,16 +340,16 @@ }, { "name": "utopia-php/database", - "version": "0.3.2", + "version": "0.5.0", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "8e56a2d399d17b2497c8ee0f8bf429ac2da90c56" + "reference": "e050e51060df72eff3af9fc24fc95a41ca9a2096" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/8e56a2d399d17b2497c8ee0f8bf429ac2da90c56", - "reference": "8e56a2d399d17b2497c8ee0f8bf429ac2da90c56", + "url": "https://api.github.com/repos/utopia-php/database/zipball/e050e51060df72eff3af9fc24fc95a41ca9a2096", + "reference": "e050e51060df72eff3af9fc24fc95a41ca9a2096", "shasum": "" }, "require": { @@ -397,9 +397,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.3.2" + "source": "https://github.com/utopia-php/database/tree/0.5.0" }, - "time": "2021-06-12T18:26:26+00:00" + "time": "2021-07-03T16:49:44+00:00" }, { "name": "utopia-php/framework", @@ -1081,16 +1081,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.10.5", + "version": "v4.11.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "4432ba399e47c66624bc73c8c0f811e5c109576f" + "reference": "fe14cf3672a149364fb66dfe11bf6549af899f94" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4432ba399e47c66624bc73c8c0f811e5c109576f", - "reference": "4432ba399e47c66624bc73c8c0f811e5c109576f", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/fe14cf3672a149364fb66dfe11bf6549af899f94", + "reference": "fe14cf3672a149364fb66dfe11bf6549af899f94", "shasum": "" }, "require": { @@ -1131,9 +1131,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.10.5" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.11.0" }, - "time": "2021-05-03T19:11:20+00:00" + "time": "2021-07-03T13:36:55+00:00" }, { "name": "openlss/lib-array2xml", @@ -1844,16 +1844,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.5", + "version": "9.5.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "89ff45ea9d70e35522fb6654a2ebc221158de276" + "reference": "fb9b8333f14e3dce976a60ef6a7e05c7c7ed8bfb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/89ff45ea9d70e35522fb6654a2ebc221158de276", - "reference": "89ff45ea9d70e35522fb6654a2ebc221158de276", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/fb9b8333f14e3dce976a60ef6a7e05c7c7ed8bfb", + "reference": "fb9b8333f14e3dce976a60ef6a7e05c7c7ed8bfb", "shasum": "" }, "require": { @@ -1883,7 +1883,7 @@ "sebastian/global-state": "^5.0.1", "sebastian/object-enumerator": "^4.0.3", "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^2.3.2", + "sebastian/type": "^2.3.4", "sebastian/version": "^3.0.2" }, "require-dev": { @@ -1931,7 +1931,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.5" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.6" }, "funding": [ { @@ -1943,7 +1943,7 @@ "type": "github" } ], - "time": "2021-06-05T04:49:07+00:00" + "time": "2021-06-23T05:14:38+00:00" }, { "name": "psr/container", @@ -3656,16 +3656,16 @@ }, { "name": "symfony/string", - "version": "v5.3.2", + "version": "v5.3.3", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "0732e97e41c0a590f77e231afc16a327375d50b0" + "reference": "bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/0732e97e41c0a590f77e231afc16a327375d50b0", - "reference": "0732e97e41c0a590f77e231afc16a327375d50b0", + "url": "https://api.github.com/repos/symfony/string/zipball/bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1", + "reference": "bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1", "shasum": "" }, "require": { @@ -3719,7 +3719,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.3.2" + "source": "https://github.com/symfony/string/tree/v5.3.3" }, "funding": [ { @@ -3735,7 +3735,7 @@ "type": "tidelift" } ], - "time": "2021-06-06T09:51:56+00:00" + "time": "2021-06-27T11:44:38+00:00" }, { "name": "theseer/tokenizer", From 3c2583c57cdc53971eca5b2b3870ad5841bbdbdb Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 4 Jul 2021 11:33:46 +0545 Subject: [PATCH 33/35] update create collection with attributes and indexes together --- src/Audit/Audit.php | 131 +++++++++++++++++++++++++++++++++++++++----- 1 file changed, 117 insertions(+), 14 deletions(-) diff --git a/src/Audit/Audit.php b/src/Audit/Audit.php index 039c31f..6eb1f8e 100644 --- a/src/Audit/Audit.php +++ b/src/Audit/Audit.php @@ -29,21 +29,124 @@ public function setup(): void { if (!$this->db->exists()) { throw new Exception("You need to create the databse before running Audit setup"); - } - $this->db->createCollection(Audit::COLLECTION); - $this->db->createAttribute(Audit::COLLECTION, 'userId', Database::VAR_STRING, Database::LENGTH_KEY, true); - $this->db->createAttribute(Audit::COLLECTION, 'event', Database::VAR_STRING, 255, true); - $this->db->createAttribute(Audit::COLLECTION, 'resource', Database::VAR_STRING, 255, false); - $this->db->createAttribute(Audit::COLLECTION, 'userAgent', Database::VAR_STRING, 65534, true); - $this->db->createAttribute(Audit::COLLECTION, 'ip', Database::VAR_STRING, 45, true); - $this->db->createAttribute(Audit::COLLECTION, 'location', Database::VAR_STRING, 45, false); - $this->db->createAttribute(Audit::COLLECTION, 'time', Database::VAR_INTEGER, 0, true, false); - $this->db->createAttribute(Audit::COLLECTION, 'data', Database::VAR_STRING, 16777216, false, true, false, ['json']); + } - $this->db->createIndex(Audit::COLLECTION, 'index1', Database::INDEX_KEY, ['userId']); - $this->db->createIndex(Audit::COLLECTION, 'index2', Database::INDEX_KEY, ['event']); - $this->db->createIndex(Audit::COLLECTION, 'index3', Database::INDEX_KEY, ['resource']); - $this->db->createIndex(Audit::COLLECTION, 'index4', Database::INDEX_KEY, ['userId', 'event']); + $attributes = [ + new Document([ + '$id' => 'userId', + 'type' => Database::VAR_STRING, + 'size' => Database::LENGTH_KEY, + 'required' => true, + 'signed' => true, + 'array' => false, + 'filters' => [], + ]), + new Document([ + '$id' => 'event', + 'type' => Database::VAR_STRING, + 'size' => 255, + 'required' => true, + 'signed' => true, + 'array' => false, + 'filters' => [], + ]), + new Document([ + '$id' => 'resource', + 'type' => Database::VAR_STRING, + 'size' => 255, + 'required' => false, + 'signed' => true, + 'array' => false, + 'filters' => [], + ]), + new Document([ + '$id' => 'userAgent', + 'type' => Database::VAR_STRING, + 'size' => 65534, + 'required' => true, + 'signed' => true, + 'array' => false, + 'filters' => [], + ]), + new Document([ + '$id' => 'ip', + 'type' => Database::VAR_STRING, + 'size' => 45, + 'required' => true, + 'signed' => true, + 'array' => false, + 'filters' => [], + ]), + new Document([ + '$id' => 'location', + 'type' => Database::VAR_STRING, + 'size' => 45, + 'required' => false, + 'signed' => true, + 'array' => false, + 'filters' => [], + ]), + new Document([ + '$id' => 'location', + 'type' => Database::VAR_STRING, + 'size' => 45, + 'required' => false, + 'signed' => true, + 'array' => false, + 'filters' => [], + ]), + new Document([ + '$id' => 'time', + 'type' => Database::VAR_INTEGER, + 'size' => 0, + 'required' => false, + 'signed' => true, + 'array' => false, + 'filters' => [], + ]), + new Document([ + '$id' => 'data', + 'type' => Database::VAR_STRING, + 'size' => 16777216, + 'required' => false, + 'signed' => true, + 'array' => false, + 'filters' => ['json'], + ]), + ]; + + $indexes = [ + new Document([ + '$id' => 'index1', + 'type' => Database::INDEX_KEY, + 'attributes' => ['userId'], + 'lengths' => [], + 'orders' => [], + ]), + new Document([ + '$id' => 'index2', + 'type' => Database::INDEX_KEY, + 'attributes' => ['event'], + 'lengths' => [], + 'orders' => [], + ]), + new Document([ + '$id' => 'index3', + 'type' => Database::INDEX_KEY, + 'attributes' => ['resource'], + 'lengths' => [], + 'orders' => [], + ]), + new Document([ + '$id' => 'index4', + 'type' => Database::INDEX_KEY, + 'attributes' => ['userId', 'event'], + 'lengths' => [], + 'orders' => [], + ]), + ]; + + $this->db->createCollection(Audit::COLLECTION, $attributes, $indexes); } From b227e0e27d8e8c749c67f2322d258c7d419ed6ca Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 4 Jul 2021 17:39:54 +0545 Subject: [PATCH 34/35] install docker --- .travis.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.travis.yml b/.travis.yml index b398118..a8162e5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,18 @@ notifications: before_script: docker run --rm --interactive --tty --volume "$(pwd)":/app composer update --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist +before_install: +- curl -fsSL https://get.docker.com | sh +- echo '{"experimental":"enabled"}' | sudo tee /etc/docker/daemon.json +- mkdir -p $HOME/.docker +- echo '{"experimental":"enabled"}' | sudo tee $HOME/.docker/config.json +- sudo service docker start +- > + if [ ! -z "${DOCKERHUB_PULL_USERNAME:-}" ]; then + echo "${DOCKERHUB_PULL_PASSWORD}" | docker login --username "${DOCKERHUB_PULL_USERNAME}" --password-stdin + fi +- docker --version + install: - docker-compose up -d - sleep 10 From e4b03bf3dd86fbde8608ae2b6774851bb66e665b Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 4 Jul 2021 17:47:18 +0545 Subject: [PATCH 35/35] remove duplicate --- src/Audit/Audit.php | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/Audit/Audit.php b/src/Audit/Audit.php index 6eb1f8e..fa39a42 100644 --- a/src/Audit/Audit.php +++ b/src/Audit/Audit.php @@ -86,15 +86,6 @@ public function setup(): void 'array' => false, 'filters' => [], ]), - new Document([ - '$id' => 'location', - 'type' => Database::VAR_STRING, - 'size' => 45, - 'required' => false, - 'signed' => true, - 'array' => false, - 'filters' => [], - ]), new Document([ '$id' => 'time', 'type' => Database::VAR_INTEGER,