From bc54b8b35ecff466887aa03fd6d0bb60895335c6 Mon Sep 17 00:00:00 2001 From: kodumbeats Date: Thu, 8 Apr 2021 09:41:54 -0400 Subject: [PATCH 1/7] Set whitelist type when not string --- app/controllers/api/users.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index 58ec3ee978..d22113d293 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -346,7 +346,7 @@ App::patch('/v1/users/:userId/status') ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_USER) ->param('userId', '', new UID(), 'User unique ID.') - ->param('status', '', new WhiteList([Auth::USER_STATUS_ACTIVATED, Auth::USER_STATUS_BLOCKED, Auth::USER_STATUS_UNACTIVATED], true), 'User Status code. To activate the user pass '.Auth::USER_STATUS_ACTIVATED.', to block the user pass '.Auth::USER_STATUS_BLOCKED.' and for disabling the user pass '.Auth::USER_STATUS_UNACTIVATED) + ->param('status', '', new WhiteList([Auth::USER_STATUS_ACTIVATED, Auth::USER_STATUS_BLOCKED, Auth::USER_STATUS_UNACTIVATED], true, 'integer'), 'User Status code. To activate the user pass '.Auth::USER_STATUS_ACTIVATED.', to block the user pass '.Auth::USER_STATUS_BLOCKED.' and for disabling the user pass '.Auth::USER_STATUS_UNACTIVATED) ->inject('response') ->inject('projectDB') ->action(function ($userId, $status, $response, $projectDB) { From 20e858dbfe65add2548db414f20dc0d3fa46072f Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Tue, 13 Apr 2021 10:46:30 +0200 Subject: [PATCH 2/7] fix: validator class and spec generator --- app/controllers/mock.php | 2 +- composer.json | 4 +-- src/Appwrite/Auth/Validator/Password.php | 24 +++++++++++++ .../Database/Validator/Authorization.php | 24 +++++++++++++ .../Database/Validator/DocumentId.php | 24 +++++++++++++ src/Appwrite/Database/Validator/Key.php | 23 ++++++++++++ .../Database/Validator/Permissions.php | 23 ++++++++++++ src/Appwrite/Database/Validator/Structure.php | 24 +++++++++++++ src/Appwrite/Database/Validator/UID.php | 24 +++++++++++++ src/Appwrite/Network/Validator/CNAME.php | 24 +++++++++++++ src/Appwrite/Network/Validator/Domain.php | 24 +++++++++++++ src/Appwrite/Network/Validator/Email.php | 36 ++++++++++++------- src/Appwrite/Network/Validator/Host.php | 36 ++++++++++++------- src/Appwrite/Network/Validator/IP.php | 36 ++++++++++++------- src/Appwrite/Network/Validator/Origin.php | 24 +++++++++++++ src/Appwrite/Network/Validator/URL.php | 36 ++++++++++++------- .../Specification/Format/OpenAPI3.php | 8 +++-- .../Specification/Format/Swagger2.php | 8 +++-- src/Appwrite/Task/Validator/Cron.php | 24 +++++++++++++ 19 files changed, 373 insertions(+), 55 deletions(-) diff --git a/app/controllers/mock.php b/app/controllers/mock.php index 7e65e2d936..dcb8d3f290 100644 --- a/app/controllers/mock.php +++ b/app/controllers/mock.php @@ -3,12 +3,12 @@ global $utopia, $request, $response; use Appwrite\Database\Document; +use Appwrite\Network\Validator\Host; use Appwrite\Utopia\Response; use Utopia\App; use Utopia\Validator\Numeric; use Utopia\Validator\Text; use Utopia\Validator\ArrayList; -use Utopia\Validator\Host; use Utopia\Storage\Validator\File; App::get('/v1/mock/tests/foo') diff --git a/composer.json b/composer.json index 661546157f..7bb9856631 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,7 @@ "appwrite/php-clamav": "1.0.*", - "utopia-php/framework": "0.12.*", + "utopia-php/framework": "0.13.*", "utopia-php/abuse": "0.4.*", "utopia-php/analytics": "0.2.*", "utopia-php/audit": "0.5.*", @@ -50,7 +50,7 @@ "utopia-php/domains": "0.2.*", "utopia-php/swoole": "0.2.*", "utopia-php/system": "0.4.*", - "utopia-php/storage": "0.4.*", + "utopia-php/storage": "0.5.*", "utopia-php/image": "0.1.*", "resque/php-resque": "1.3.6", diff --git a/src/Appwrite/Auth/Validator/Password.php b/src/Appwrite/Auth/Validator/Password.php index 3afcbe7aa3..d3dd810fa7 100644 --- a/src/Appwrite/Auth/Validator/Password.php +++ b/src/Appwrite/Auth/Validator/Password.php @@ -40,4 +40,28 @@ class Password extends Validator return true; } + + /** + * Is array + * + * Function will return true if object is array. + * + * @return bool + */ + public function isArray(): bool + { + return false; + } + + /** + * Get Type + * + * Returns validator type. + * + * @return string + */ + public function getType(): string + { + return self::TYPE_STRING; + } } diff --git a/src/Appwrite/Database/Validator/Authorization.php b/src/Appwrite/Database/Validator/Authorization.php index 5537413b4d..1ae2554001 100644 --- a/src/Appwrite/Database/Validator/Authorization.php +++ b/src/Appwrite/Database/Validator/Authorization.php @@ -188,4 +188,28 @@ class Authorization extends Validator { self::$status = self::$statusDefault; } + + /** + * Is array + * + * Function will return true if object is array. + * + * @return bool + */ + public function isArray(): bool + { + return false; + } + + /** + * Get Type + * + * Returns validator type. + * + * @return string + */ + public function getType(): string + { + return self::TYPE_ARRAY; + } } diff --git a/src/Appwrite/Database/Validator/DocumentId.php b/src/Appwrite/Database/Validator/DocumentId.php index ecfdcc5624..fcc2a57aef 100644 --- a/src/Appwrite/Database/Validator/DocumentId.php +++ b/src/Appwrite/Database/Validator/DocumentId.php @@ -78,4 +78,28 @@ class DocumentId extends Validator return true; } + + /** + * Is array + * + * Function will return true if object is array. + * + * @return bool + */ + public function isArray(): bool + { + return false; + } + + /** + * Get Type + * + * Returns validator type. + * + * @return string + */ + public function getType(): string + { + return self::TYPE_STRING; + } } diff --git a/src/Appwrite/Database/Validator/Key.php b/src/Appwrite/Database/Validator/Key.php index 53cdc3eb77..1aab06f76d 100644 --- a/src/Appwrite/Database/Validator/Key.php +++ b/src/Appwrite/Database/Validator/Key.php @@ -48,4 +48,27 @@ class Key extends Validator return true; } + /** + * Is array + * + * Function will return true if object is array. + * + * @return bool + */ + public function isArray(): bool + { + return false; + } + + /** + * Get Type + * + * Returns validator type. + * + * @return string + */ + public function getType(): string + { + return self::TYPE_STRING; + } } diff --git a/src/Appwrite/Database/Validator/Permissions.php b/src/Appwrite/Database/Validator/Permissions.php index 36667e674f..2c90eef60d 100644 --- a/src/Appwrite/Database/Validator/Permissions.php +++ b/src/Appwrite/Database/Validator/Permissions.php @@ -74,4 +74,27 @@ class Permissions extends Validator return true; } + /** + * Is array + * + * Function will return true if object is array. + * + * @return bool + */ + public function isArray(): bool + { + return false; + } + + /** + * Get Type + * + * Returns validator type. + * + * @return string + */ + public function getType(): string + { + return self::TYPE_ARRAY; + } } diff --git a/src/Appwrite/Database/Validator/Structure.php b/src/Appwrite/Database/Validator/Structure.php index 5aea6c1b3b..7b3456644c 100644 --- a/src/Appwrite/Database/Validator/Structure.php +++ b/src/Appwrite/Database/Validator/Structure.php @@ -285,4 +285,28 @@ class Structure extends Validator { return $this->database->getDocument($id); } + + /** + * Is array + * + * Function will return true if object is array. + * + * @return bool + */ + public function isArray(): bool + { + return false; + } + + /** + * Get Type + * + * Returns validator type. + * + * @return string + */ + public function getType(): string + { + return self::TYPE_OBJECT; + } } diff --git a/src/Appwrite/Database/Validator/UID.php b/src/Appwrite/Database/Validator/UID.php index 4cc3f1d5b2..8e60ec0632 100644 --- a/src/Appwrite/Database/Validator/UID.php +++ b/src/Appwrite/Database/Validator/UID.php @@ -43,4 +43,28 @@ class UID extends Validator return true; } + + /** + * Is array + * + * Function will return true if object is array. + * + * @return bool + */ + public function isArray(): bool + { + return false; + } + + /** + * Get Type + * + * Returns validator type. + * + * @return string + */ + public function getType(): string + { + return self::TYPE_STRING; + } } diff --git a/src/Appwrite/Network/Validator/CNAME.php b/src/Appwrite/Network/Validator/CNAME.php index c2adfdddde..12b88908f7 100644 --- a/src/Appwrite/Network/Validator/CNAME.php +++ b/src/Appwrite/Network/Validator/CNAME.php @@ -54,4 +54,28 @@ class CNAME extends Validator return false; } + + /** + * Is array + * + * Function will return true if object is array. + * + * @return bool + */ + public function isArray(): bool + { + return false; + } + + /** + * Get Type + * + * Returns validator type. + * + * @return string + */ + public function getType(): string + { + return self::TYPE_STRING; + } } diff --git a/src/Appwrite/Network/Validator/Domain.php b/src/Appwrite/Network/Validator/Domain.php index 0d5def06c6..8a70ec8b03 100644 --- a/src/Appwrite/Network/Validator/Domain.php +++ b/src/Appwrite/Network/Validator/Domain.php @@ -51,4 +51,28 @@ class Domain extends Validator return true; } + + /** + * Is array + * + * Function will return true if object is array. + * + * @return bool + */ + public function isArray(): bool + { + return false; + } + + /** + * Get Type + * + * Returns validator type. + * + * @return string + */ + public function getType(): string + { + return self::TYPE_STRING; + } } diff --git a/src/Appwrite/Network/Validator/Email.php b/src/Appwrite/Network/Validator/Email.php index ca9ba1d53d..ab3a324ea1 100644 --- a/src/Appwrite/Network/Validator/Email.php +++ b/src/Appwrite/Network/Validator/Email.php @@ -25,18 +25,6 @@ class Email extends Validator return 'Value must be a valid email address'; } - /** - * Get Type - * - * Returns validator type. - * - * @return string - */ - public function getType() - { - return 'string'; - } - /** * Is valid * @@ -53,4 +41,28 @@ class Email extends Validator return true; } + + /** + * Is array + * + * Function will return true if object is array. + * + * @return bool + */ + public function isArray(): bool + { + return false; + } + + /** + * Get Type + * + * Returns validator type. + * + * @return string + */ + public function getType(): string + { + return self::TYPE_STRING; + } } diff --git a/src/Appwrite/Network/Validator/Host.php b/src/Appwrite/Network/Validator/Host.php index f746ecd752..b0f8b23073 100644 --- a/src/Appwrite/Network/Validator/Host.php +++ b/src/Appwrite/Network/Validator/Host.php @@ -35,18 +35,6 @@ class Host extends Validator return 'URL host must be one of: ' . \implode(', ', $this->whitelist); } - /** - * Get Type - * - * Returns validator type. - * - * @return string - */ - public function getType() - { - return 'string'; - } - /** * Is valid * @@ -69,4 +57,28 @@ class Host extends Validator return false; } + + /** + * Is array + * + * Function will return true if object is array. + * + * @return bool + */ + public function isArray(): bool + { + return false; + } + + /** + * Get Type + * + * Returns validator type. + * + * @return string + */ + public function getType(): string + { + return self::TYPE_STRING; + } } diff --git a/src/Appwrite/Network/Validator/IP.php b/src/Appwrite/Network/Validator/IP.php index 523147eb2d..84689b3ff7 100644 --- a/src/Appwrite/Network/Validator/IP.php +++ b/src/Appwrite/Network/Validator/IP.php @@ -51,18 +51,6 @@ class IP extends Validator return 'Value must be a valid IP address'; } - /** - * Get Type - * - * Returns validator type. - * - * @return string - */ - public function getType() - { - return 'string'; - } - /** * Is valid * @@ -99,4 +87,28 @@ class IP extends Validator return false; } + + /** + * Is array + * + * Function will return true if object is array. + * + * @return bool + */ + public function isArray(): bool + { + return false; + } + + /** + * Get Type + * + * Returns validator type. + * + * @return string + */ + public function getType(): string + { + return self::TYPE_STRING; + } } diff --git a/src/Appwrite/Network/Validator/Origin.php b/src/Appwrite/Network/Validator/Origin.php index c0afb1f56d..8101d9a30c 100644 --- a/src/Appwrite/Network/Validator/Origin.php +++ b/src/Appwrite/Network/Validator/Origin.php @@ -119,4 +119,28 @@ class Origin extends Validator return false; } + + /** + * Is array + * + * Function will return true if object is array. + * + * @return bool + */ + public function isArray(): bool + { + return false; + } + + /** + * Get Type + * + * Returns validator type. + * + * @return string + */ + public function getType(): string + { + return self::TYPE_STRING; + } } diff --git a/src/Appwrite/Network/Validator/URL.php b/src/Appwrite/Network/Validator/URL.php index bd1546e111..d26159381c 100644 --- a/src/Appwrite/Network/Validator/URL.php +++ b/src/Appwrite/Network/Validator/URL.php @@ -25,18 +25,6 @@ class URL extends Validator return 'Value must be a valid URL'; } - /** - * Get Type - * - * Returns validator type. - * - * @return string - */ - public function getType() - { - return 'string'; - } - /** * Is valid * @@ -53,4 +41,28 @@ class URL extends Validator return true; } + + /** + * Is array + * + * Function will return true if object is array. + * + * @return bool + */ + public function isArray(): bool + { + return false; + } + + /** + * Get Type + * + * Returns validator type. + * + * @return string + */ + public function getType(): string + { + return self::TYPE_STRING; + } } diff --git a/src/Appwrite/Specification/Format/OpenAPI3.php b/src/Appwrite/Specification/Format/OpenAPI3.php index f01673d3a5..1e9313ca6f 100644 --- a/src/Appwrite/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/Specification/Format/OpenAPI3.php @@ -251,14 +251,18 @@ class OpenAPI3 extends Format case 'Utopia\Validator\Length': $node['schema']['type'] = 'string'; break; - case 'Utopia\Validator\Host': + case 'Appwrite\Network\Validator\Host': $node['schema']['type'] = 'string'; $node['schema']['format'] = 'url'; $node['schema']['x-example'] = 'https://example.com'; break; case 'Utopia\Validator\WhiteList': /** @var \Utopia\Validator\WhiteList $validator */ - $node['schema']['type'] = 'string'; + $node['schema']['type'] = $validator->getType(); $node['schema']['x-example'] = $validator->getList()[0]; + + if ($validator->getType() === 'integer') { + $node['format'] = 'int32'; + } break; default: $node['schema']['type'] = 'string'; diff --git a/src/Appwrite/Specification/Format/Swagger2.php b/src/Appwrite/Specification/Format/Swagger2.php index 1d92a0ea3c..84ec265550 100644 --- a/src/Appwrite/Specification/Format/Swagger2.php +++ b/src/Appwrite/Specification/Format/Swagger2.php @@ -248,14 +248,18 @@ class Swagger2 extends Format case 'Utopia\Validator\Length': $node['type'] = 'string'; break; - case 'Utopia\Validator\Host': + case 'Appwrite\Network\Validator\Host': $node['type'] = 'string'; $node['format'] = 'url'; $node['x-example'] = 'https://example.com'; break; case 'Utopia\Validator\WhiteList': /** @var \Utopia\Validator\WhiteList $validator */ - $node['type'] = 'string'; + $node['type'] = $validator->getType(); $node['x-example'] = $validator->getList()[0]; + + if ($validator->getType() === 'integer') { + $node['format'] = 'int32'; + } break; default: $node['type'] = 'string'; diff --git a/src/Appwrite/Task/Validator/Cron.php b/src/Appwrite/Task/Validator/Cron.php index 18f427ee7b..544482048e 100644 --- a/src/Appwrite/Task/Validator/Cron.php +++ b/src/Appwrite/Task/Validator/Cron.php @@ -40,4 +40,28 @@ class Cron extends Validator return true; } + + /** + * Is array + * + * Function will return true if object is array. + * + * @return bool + */ + public function isArray(): bool + { + return false; + } + + /** + * Get Type + * + * Returns validator type. + * + * @return string + */ + public function getType(): string + { + return self::TYPE_STRING; + } } From 08586aa78c117a5fd45348feae8f5eab2675a6fa Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Thu, 15 Apr 2021 19:14:56 +0200 Subject: [PATCH 3/7] deps: update composer --- composer.lock | 203 +++++++++++++++++++++++++------------------------- 1 file changed, 102 insertions(+), 101 deletions(-) diff --git a/composer.lock b/composer.lock index d64fc2e195..3ef221d8e2 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": "a5a066bf0b739b7b412149aeb0e9a396", + "content-hash": "fb036a60be94e5d0751a7ab5d3c07efc", "packages": [ { "name": "adhocore/jwt", @@ -1706,16 +1706,16 @@ }, { "name": "utopia-php/framework", - "version": "0.12.3", + "version": "0.13.0", "source": { "type": "git", "url": "https://github.com/utopia-php/framework.git", - "reference": "78be43a0eb711f3677769dfb445e5111bfafaa88" + "reference": "b54ee9c79b4fae52f196825aa6e659318fb8adb6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/framework/zipball/78be43a0eb711f3677769dfb445e5111bfafaa88", - "reference": "78be43a0eb711f3677769dfb445e5111bfafaa88", + "url": "https://api.github.com/repos/utopia-php/framework/zipball/b54ee9c79b4fae52f196825aa6e659318fb8adb6", + "reference": "b54ee9c79b4fae52f196825aa6e659318fb8adb6", "shasum": "" }, "require": { @@ -1749,9 +1749,9 @@ ], "support": { "issues": "https://github.com/utopia-php/framework/issues", - "source": "https://github.com/utopia-php/framework/tree/0.12.3" + "source": "https://github.com/utopia-php/framework/tree/0.13.0" }, - "time": "2021-03-22T22:02:23+00:00" + "time": "2021-04-13T07:30:50+00:00" }, { "name": "utopia-php/image", @@ -1964,16 +1964,16 @@ }, { "name": "utopia-php/storage", - "version": "0.4.3", + "version": "0.5.0", "source": { "type": "git", "url": "https://github.com/utopia-php/storage.git", - "reference": "9db3ab713a6d392c3c2c799aeea751f6c8dc2ff7" + "reference": "92ae20c7a2ac329f573a58a82dc245134cc63408" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/storage/zipball/9db3ab713a6d392c3c2c799aeea751f6c8dc2ff7", - "reference": "9db3ab713a6d392c3c2c799aeea751f6c8dc2ff7", + "url": "https://api.github.com/repos/utopia-php/storage/zipball/92ae20c7a2ac329f573a58a82dc245134cc63408", + "reference": "92ae20c7a2ac329f573a58a82dc245134cc63408", "shasum": "" }, "require": { @@ -2010,9 +2010,9 @@ ], "support": { "issues": "https://github.com/utopia-php/storage/issues", - "source": "https://github.com/utopia-php/storage/tree/0.4.3" + "source": "https://github.com/utopia-php/storage/tree/0.5.0" }, - "time": "2021-03-02T20:25:02+00:00" + "time": "2021-04-15T16:43:12+00:00" }, { "name": "utopia-php/swoole", @@ -2276,12 +2276,12 @@ "source": { "type": "git", "url": "https://github.com/amphp/byte-stream.git", - "reference": "f813a658f0446192c5e17f96727070ee9342b93a" + "reference": "7a64a9ad336fc5e1e70b1c1fc1e9618a7027332e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/byte-stream/zipball/f813a658f0446192c5e17f96727070ee9342b93a", - "reference": "f813a658f0446192c5e17f96727070ee9342b93a", + "url": "https://api.github.com/repos/amphp/byte-stream/zipball/7a64a9ad336fc5e1e70b1c1fc1e9618a7027332e", + "reference": "7a64a9ad336fc5e1e70b1c1fc1e9618a7027332e", "shasum": "" }, "require": { @@ -2346,7 +2346,7 @@ "type": "github" } ], - "time": "2020-08-30T19:23:04+00:00" + "time": "2021-04-05T20:23:22+00:00" }, { "name": "appwrite/sdk-generator", @@ -2544,16 +2544,16 @@ }, { "name": "composer/xdebug-handler", - "version": "1.4.5", + "version": "1.4.x-dev", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "f28d44c286812c714741478d968104c5e604a1d4" + "reference": "f27e06cd9675801df441b3656569b328e04aa37c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/f28d44c286812c714741478d968104c5e604a1d4", - "reference": "f28d44c286812c714741478d968104c5e604a1d4", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/f27e06cd9675801df441b3656569b328e04aa37c", + "reference": "f27e06cd9675801df441b3656569b328e04aa37c", "shasum": "" }, "require": { @@ -2561,7 +2561,8 @@ "psr/log": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8" + "phpstan/phpstan": "^0.12.55", + "symfony/phpunit-bridge": "^4.2 || ^5" }, "type": "library", "autoload": { @@ -2587,7 +2588,7 @@ "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.5" + "source": "https://github.com/composer/xdebug-handler/tree/1.4.6" }, "funding": [ { @@ -2603,7 +2604,7 @@ "type": "tidelift" } ], - "time": "2020-11-13T08:04:11+00:00" + "time": "2021-03-25T17:01:18+00:00" }, { "name": "dnoegel/php-xdg-base-dir", @@ -3509,12 +3510,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "ad069801f3d0cdb7102e58afd5f9f32834ec7160" + "reference": "f6293e1b30a2354e8428e004689671b83871edde" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ad069801f3d0cdb7102e58afd5f9f32834ec7160", - "reference": "ad069801f3d0cdb7102e58afd5f9f32834ec7160", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f6293e1b30a2354e8428e004689671b83871edde", + "reference": "f6293e1b30a2354e8428e004689671b83871edde", "shasum": "" }, "require": { @@ -3570,7 +3571,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.6" }, "funding": [ { @@ -3578,7 +3579,7 @@ "type": "github" } ], - "time": "2021-02-08T09:55:27+00:00" + "time": "2021-03-28T07:26:59+00:00" }, { "name": "phpunit/php-file-iterator", @@ -3586,12 +3587,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "b2ce4cf415b9989fac88e8c27c39b5ba2faad72b" + "reference": "97eb187efc3560da69c5b501235cd3eb1ebfec86" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/b2ce4cf415b9989fac88e8c27c39b5ba2faad72b", - "reference": "b2ce4cf415b9989fac88e8c27c39b5ba2faad72b", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/97eb187efc3560da69c5b501235cd3eb1ebfec86", + "reference": "97eb187efc3560da69c5b501235cd3eb1ebfec86", "shasum": "" }, "require": { @@ -3639,7 +3640,7 @@ "type": "github" } ], - "time": "2021-03-17T06:17:19+00:00" + "time": "2021-04-02T08:22:03+00:00" }, { "name": "phpunit/php-invoker", @@ -3647,12 +3648,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "e2905d5648ac5e9bd0aa85b50d240e5890f76493" + "reference": "de89b92643f75d97135fd0f895d4369630952c95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/e2905d5648ac5e9bd0aa85b50d240e5890f76493", - "reference": "e2905d5648ac5e9bd0aa85b50d240e5890f76493", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/de89b92643f75d97135fd0f895d4369630952c95", + "reference": "de89b92643f75d97135fd0f895d4369630952c95", "shasum": "" }, "require": { @@ -3703,7 +3704,7 @@ "type": "github" } ], - "time": "2021-03-17T06:17:27+00:00" + "time": "2021-04-02T08:22:12+00:00" }, { "name": "phpunit/php-text-template", @@ -3711,12 +3712,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "e6a2483ffd3659d723996fb8b2ca638244b87e7c" + "reference": "f46a87d94ad351b46c836f6cdda98795e8a6c979" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/e6a2483ffd3659d723996fb8b2ca638244b87e7c", - "reference": "e6a2483ffd3659d723996fb8b2ca638244b87e7c", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/f46a87d94ad351b46c836f6cdda98795e8a6c979", + "reference": "f46a87d94ad351b46c836f6cdda98795e8a6c979", "shasum": "" }, "require": { @@ -3763,7 +3764,7 @@ "type": "github" } ], - "time": "2021-03-17T06:17:59+00:00" + "time": "2021-04-02T08:22:46+00:00" }, { "name": "phpunit/php-timer", @@ -3771,12 +3772,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "c0187813193d3709a455b94916bbee2881a1c6e3" + "reference": "bd80d581ad411a5a4b7e613541a7f4cd09cf0da9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/c0187813193d3709a455b94916bbee2881a1c6e3", - "reference": "c0187813193d3709a455b94916bbee2881a1c6e3", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/bd80d581ad411a5a4b7e613541a7f4cd09cf0da9", + "reference": "bd80d581ad411a5a4b7e613541a7f4cd09cf0da9", "shasum": "" }, "require": { @@ -3823,7 +3824,7 @@ "type": "github" } ], - "time": "2021-03-17T06:17:35+00:00" + "time": "2021-04-02T08:22:20+00:00" }, { "name": "phpunit/phpunit", @@ -3982,12 +3983,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "845853b8c553f6b61d9a708b8f26066806bcc7dd" + "reference": "e59dfbeeaf6ccdff168c537427cbc9f7fed6b160" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/845853b8c553f6b61d9a708b8f26066806bcc7dd", - "reference": "845853b8c553f6b61d9a708b8f26066806bcc7dd", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/e59dfbeeaf6ccdff168c537427cbc9f7fed6b160", + "reference": "e59dfbeeaf6ccdff168c537427cbc9f7fed6b160", "shasum": "" }, "require": { @@ -4031,7 +4032,7 @@ "type": "github" } ], - "time": "2021-03-17T06:18:24+00:00" + "time": "2021-04-02T08:23:11+00:00" }, { "name": "sebastian/code-unit", @@ -4095,12 +4096,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ab4d610891809670894a4fc260c17e5d5960ba4c" + "reference": "f7ee1d817bdd8a8bdfb76b11fa851204132ef6d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ab4d610891809670894a4fc260c17e5d5960ba4c", - "reference": "ab4d610891809670894a4fc260c17e5d5960ba4c", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/f7ee1d817bdd8a8bdfb76b11fa851204132ef6d9", + "reference": "f7ee1d817bdd8a8bdfb76b11fa851204132ef6d9", "shasum": "" }, "require": { @@ -4143,7 +4144,7 @@ "type": "github" } ], - "time": "2021-03-17T06:16:16+00:00" + "time": "2021-04-02T08:20:56+00:00" }, { "name": "sebastian/comparator", @@ -4151,12 +4152,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "d3d66b8faa86ac57e1236d576ad003f73097c9cd" + "reference": "604de433dd3e1467ded9a92414b3561a812554c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/d3d66b8faa86ac57e1236d576ad003f73097c9cd", - "reference": "d3d66b8faa86ac57e1236d576ad003f73097c9cd", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/604de433dd3e1467ded9a92414b3561a812554c5", + "reference": "604de433dd3e1467ded9a92414b3561a812554c5", "shasum": "" }, "require": { @@ -4218,7 +4219,7 @@ "type": "github" } ], - "time": "2021-03-17T06:16:24+00:00" + "time": "2021-04-02T08:21:05+00:00" }, { "name": "sebastian/complexity", @@ -4283,12 +4284,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "e81849c6dfbe34442b4685fa457fd6f012370e54" + "reference": "3fa178cf5772d7a09bcfe01bfb7acc13edcf8aec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/e81849c6dfbe34442b4685fa457fd6f012370e54", - "reference": "e81849c6dfbe34442b4685fa457fd6f012370e54", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3fa178cf5772d7a09bcfe01bfb7acc13edcf8aec", + "reference": "3fa178cf5772d7a09bcfe01bfb7acc13edcf8aec", "shasum": "" }, "require": { @@ -4342,7 +4343,7 @@ "type": "github" } ], - "time": "2021-03-17T06:16:31+00:00" + "time": "2021-04-02T08:21:13+00:00" }, { "name": "sebastian/environment", @@ -4350,12 +4351,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "c25633688d84a9f8694989223479051b5a8a23e7" + "reference": "1fe23c75ca20a9cfe5ef8af473c726f9ef7e9465" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/c25633688d84a9f8694989223479051b5a8a23e7", - "reference": "c25633688d84a9f8694989223479051b5a8a23e7", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1fe23c75ca20a9cfe5ef8af473c726f9ef7e9465", + "reference": "1fe23c75ca20a9cfe5ef8af473c726f9ef7e9465", "shasum": "" }, "require": { @@ -4406,7 +4407,7 @@ "type": "github" } ], - "time": "2021-03-17T06:16:40+00:00" + "time": "2021-04-02T08:21:21+00:00" }, { "name": "sebastian/exporter", @@ -4414,12 +4415,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "9119858d42f3963d01b737f029bb90f8464fd0ca" + "reference": "31abe95278f9b406051b4a26faf2677fbcc01755" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/9119858d42f3963d01b737f029bb90f8464fd0ca", - "reference": "9119858d42f3963d01b737f029bb90f8464fd0ca", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/31abe95278f9b406051b4a26faf2677fbcc01755", + "reference": "31abe95278f9b406051b4a26faf2677fbcc01755", "shasum": "" }, "require": { @@ -4484,7 +4485,7 @@ "type": "github" } ], - "time": "2021-03-17T06:16:48+00:00" + "time": "2021-04-02T08:21:30+00:00" }, { "name": "sebastian/global-state", @@ -4492,12 +4493,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "fe610de5530e3d29007134f76ee8dc79581a607d" + "reference": "8684de2d84cd6a819f5e22a1292cd3b2e1f26487" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/fe610de5530e3d29007134f76ee8dc79581a607d", - "reference": "fe610de5530e3d29007134f76ee8dc79581a607d", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/8684de2d84cd6a819f5e22a1292cd3b2e1f26487", + "reference": "8684de2d84cd6a819f5e22a1292cd3b2e1f26487", "shasum": "" }, "require": { @@ -4549,7 +4550,7 @@ "type": "github" } ], - "time": "2021-03-17T06:16:56+00:00" + "time": "2021-04-02T08:21:38+00:00" }, { "name": "sebastian/lines-of-code", @@ -4614,12 +4615,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "01ab82e49081de59e2da70c351d5f698c77c33c5" + "reference": "b331fc5975a2225e6b93c7e6cd9fce0a57f0fddc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/01ab82e49081de59e2da70c351d5f698c77c33c5", - "reference": "01ab82e49081de59e2da70c351d5f698c77c33c5", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/b331fc5975a2225e6b93c7e6cd9fce0a57f0fddc", + "reference": "b331fc5975a2225e6b93c7e6cd9fce0a57f0fddc", "shasum": "" }, "require": { @@ -4664,7 +4665,7 @@ "type": "github" } ], - "time": "2021-03-17T06:17:03+00:00" + "time": "2021-04-02T08:21:47+00:00" }, { "name": "sebastian/object-reflector", @@ -4672,12 +4673,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "7ed67aee59862b40785138f0203e86f1fde1b93a" + "reference": "297a334e3ae78670a7633e36569d7362bb7397bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/7ed67aee59862b40785138f0203e86f1fde1b93a", - "reference": "7ed67aee59862b40785138f0203e86f1fde1b93a", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/297a334e3ae78670a7633e36569d7362bb7397bf", + "reference": "297a334e3ae78670a7633e36569d7362bb7397bf", "shasum": "" }, "require": { @@ -4720,7 +4721,7 @@ "type": "github" } ], - "time": "2021-03-17T06:17:11+00:00" + "time": "2021-04-02T08:21:54+00:00" }, { "name": "sebastian/recursion-context", @@ -4728,12 +4729,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "249976376508ed7e83b6dc429cd883a44b2a3c51" + "reference": "78526ace5bac7c10048020f0317c58fd310a14ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/249976376508ed7e83b6dc429cd883a44b2a3c51", - "reference": "249976376508ed7e83b6dc429cd883a44b2a3c51", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/78526ace5bac7c10048020f0317c58fd310a14ec", + "reference": "78526ace5bac7c10048020f0317c58fd310a14ec", "shasum": "" }, "require": { @@ -4784,7 +4785,7 @@ "type": "github" } ], - "time": "2021-03-17T06:17:43+00:00" + "time": "2021-04-02T08:22:30+00:00" }, { "name": "sebastian/resource-operations", @@ -4848,12 +4849,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "e02c851008e26557b4f1b4ffd139b71c96937b04" + "reference": "17fc98bb3c75a02a1a99ffdd022e84ac6d22bd51" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/e02c851008e26557b4f1b4ffd139b71c96937b04", - "reference": "e02c851008e26557b4f1b4ffd139b71c96937b04", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/17fc98bb3c75a02a1a99ffdd022e84ac6d22bd51", + "reference": "17fc98bb3c75a02a1a99ffdd022e84ac6d22bd51", "shasum": "" }, "require": { @@ -4897,7 +4898,7 @@ "type": "github" } ], - "time": "2021-03-17T06:17:51+00:00" + "time": "2021-04-02T08:36:52+00:00" }, { "name": "sebastian/version", @@ -4996,12 +4997,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "5da8b675121f9f4419b7052caa0cc6118a3ccd47" + "reference": "9a90698d4624b85a578007a00312338d3adecaf8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/5da8b675121f9f4419b7052caa0cc6118a3ccd47", - "reference": "5da8b675121f9f4419b7052caa0cc6118a3ccd47", + "url": "https://api.github.com/repos/symfony/console/zipball/9a90698d4624b85a578007a00312338d3adecaf8", + "reference": "9a90698d4624b85a578007a00312338d3adecaf8", "shasum": "" }, "require": { @@ -5087,7 +5088,7 @@ "type": "tidelift" } ], - "time": "2021-03-23T14:20:07+00:00" + "time": "2021-04-09T09:54:19+00:00" }, { "name": "symfony/deprecation-contracts", @@ -5575,12 +5576,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "1309413986521646bb0ba91140afdc2a61ed8cfe" + "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/1309413986521646bb0ba91140afdc2a61ed8cfe", - "reference": "1309413986521646bb0ba91140afdc2a61ed8cfe", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", + "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", "shasum": "" }, "require": { @@ -5647,7 +5648,7 @@ "type": "tidelift" } ], - "time": "2021-03-23T23:28:01+00:00" + "time": "2021-04-01T10:43:52+00:00" }, { "name": "symfony/string", @@ -5789,12 +5790,12 @@ "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "116bfb0bc9ec2a39db93431b7fe67144164d251e" + "reference": "f7250c6ea6b6cdd724e25ce7c56e2a60006203cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/116bfb0bc9ec2a39db93431b7fe67144164d251e", - "reference": "116bfb0bc9ec2a39db93431b7fe67144164d251e", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/f7250c6ea6b6cdd724e25ce7c56e2a60006203cb", + "reference": "f7250c6ea6b6cdd724e25ce7c56e2a60006203cb", "shasum": "" }, "require": { @@ -5860,7 +5861,7 @@ "type": "tidelift" } ], - "time": "2021-03-22T08:23:49+00:00" + "time": "2021-04-10T08:17:25+00:00" }, { "name": "vimeo/psalm", From 604b3217f3d7ff0a679a884412fd6e953d676b93 Mon Sep 17 00:00:00 2001 From: kodumbeats Date: Thu, 15 Apr 2021 16:33:47 -0400 Subject: [PATCH 4/7] Use validator type constants --- app/controllers/api/users.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index d22113d293..dcadab5b4e 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -2,6 +2,7 @@ use Utopia\App; use Utopia\Exception; +use Utopia\Validator; use Utopia\Validator\Assoc; use Utopia\Validator\WhiteList; use Appwrite\Network\Validator\Email; @@ -346,7 +347,7 @@ App::patch('/v1/users/:userId/status') ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_USER) ->param('userId', '', new UID(), 'User unique ID.') - ->param('status', '', new WhiteList([Auth::USER_STATUS_ACTIVATED, Auth::USER_STATUS_BLOCKED, Auth::USER_STATUS_UNACTIVATED], true, 'integer'), 'User Status code. To activate the user pass '.Auth::USER_STATUS_ACTIVATED.', to block the user pass '.Auth::USER_STATUS_BLOCKED.' and for disabling the user pass '.Auth::USER_STATUS_UNACTIVATED) + ->param('status', '', new WhiteList([Auth::USER_STATUS_ACTIVATED, Auth::USER_STATUS_BLOCKED, Auth::USER_STATUS_UNACTIVATED], true, Validator::TYPE_INTEGER), 'User Status code. To activate the user pass '.Auth::USER_STATUS_ACTIVATED.', to block the user pass '.Auth::USER_STATUS_BLOCKED.' and for disabling the user pass '.Auth::USER_STATUS_UNACTIVATED) ->inject('response') ->inject('projectDB') ->action(function ($userId, $status, $response, $projectDB) { From 20f08f79ace21da4c929aa5b363e9ac54f7a8667 Mon Sep 17 00:00:00 2001 From: kodumbeats Date: Thu, 15 Apr 2021 21:50:33 +0000 Subject: [PATCH 5/7] Validators refactored out of utopia --- src/Appwrite/Database/Validator/Structure.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Appwrite/Database/Validator/Structure.php b/src/Appwrite/Database/Validator/Structure.php index 7b3456644c..8741e22be9 100644 --- a/src/Appwrite/Database/Validator/Structure.php +++ b/src/Appwrite/Database/Validator/Structure.php @@ -4,6 +4,7 @@ namespace Appwrite\Database\Validator; use Appwrite\Database\Database; use Appwrite\Database\Document; +use Appwrite\Network\Validator as NetworkValidator; use Utopia\Validator; class Structure extends Validator @@ -187,13 +188,13 @@ class Structure extends Validator $validator = new Validator\Boolean(); break; case self::RULE_TYPE_EMAIL: - $validator = new Validator\Email(); + $validator = new NetworkValidator\Email(); break; case self::RULE_TYPE_URL: - $validator = new Validator\URL(); + $validator = new NetworkValidator\URL(); break; case self::RULE_TYPE_IP: - $validator = new Validator\IP(); + $validator = new NetworkValidator\IP(); break; case self::RULE_TYPE_WILDCARD: $validator = new Validator\Mock(); From 64081ea0487d992c754242632d5f392d4eedc9e7 Mon Sep 17 00:00:00 2001 From: kodumbeats Date: Fri, 16 Apr 2021 12:09:39 +0000 Subject: [PATCH 6/7] Replace Mock with new Wildcard --- composer.json | 2 +- composer.lock | 14 +++++++------- src/Appwrite/Database/Validator/Structure.php | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index 7bb9856631..e6f80a4542 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,7 @@ "appwrite/php-clamav": "1.0.*", - "utopia-php/framework": "0.13.*", + "utopia-php/framework": "0.14.*", "utopia-php/abuse": "0.4.*", "utopia-php/analytics": "0.2.*", "utopia-php/audit": "0.5.*", diff --git a/composer.lock b/composer.lock index 3ef221d8e2..fdb1b0df9e 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": "fb036a60be94e5d0751a7ab5d3c07efc", + "content-hash": "544f25cc93cdc39a8e705f44c7bbd0a7", "packages": [ { "name": "adhocore/jwt", @@ -1706,16 +1706,16 @@ }, { "name": "utopia-php/framework", - "version": "0.13.0", + "version": "0.14.0", "source": { "type": "git", "url": "https://github.com/utopia-php/framework.git", - "reference": "b54ee9c79b4fae52f196825aa6e659318fb8adb6" + "reference": "92d4a36f3b0e22393a31877c5317c96e01760339" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/framework/zipball/b54ee9c79b4fae52f196825aa6e659318fb8adb6", - "reference": "b54ee9c79b4fae52f196825aa6e659318fb8adb6", + "url": "https://api.github.com/repos/utopia-php/framework/zipball/92d4a36f3b0e22393a31877c5317c96e01760339", + "reference": "92d4a36f3b0e22393a31877c5317c96e01760339", "shasum": "" }, "require": { @@ -1749,9 +1749,9 @@ ], "support": { "issues": "https://github.com/utopia-php/framework/issues", - "source": "https://github.com/utopia-php/framework/tree/0.13.0" + "source": "https://github.com/utopia-php/framework/tree/0.14.0" }, - "time": "2021-04-13T07:30:50+00:00" + "time": "2021-04-15T21:01:44+00:00" }, { "name": "utopia-php/image", diff --git a/src/Appwrite/Database/Validator/Structure.php b/src/Appwrite/Database/Validator/Structure.php index 8741e22be9..58a4eeadd2 100644 --- a/src/Appwrite/Database/Validator/Structure.php +++ b/src/Appwrite/Database/Validator/Structure.php @@ -197,7 +197,7 @@ class Structure extends Validator $validator = new NetworkValidator\IP(); break; case self::RULE_TYPE_WILDCARD: - $validator = new Validator\Mock(); + $validator = new Validator\Wildcard(); break; case self::RULE_TYPE_DOCUMENT: $validator = new Collection($this->database, (isset($rule['list'])) ? $rule['list'] : []); From 5f60c09158fc27e88e05a92352d59b9e86793459 Mon Sep 17 00:00:00 2001 From: kodumbeats Date: Mon, 19 Apr 2021 09:32:27 -0400 Subject: [PATCH 7/7] Update composer to calculate hashes --- composer.lock | 90 +++++++++++++++++++++++++-------------------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/composer.lock b/composer.lock index a5858f913c..1a2d46c5b5 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": "5da41c79568fd0847c9e22ba8827ea41", + "content-hash": "4794e92620ff45f0f8c9bf92d9763c64", "packages": [ { "name": "adhocore/jwt", @@ -1260,12 +1260,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", - "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", "shasum": "" }, "require": { @@ -1278,7 +1278,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1316,7 +1316,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-ctype/tree/main" }, "funding": [ { @@ -1332,7 +1332,7 @@ "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { "name": "utopia-php/abuse", @@ -4997,12 +4997,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "9a90698d4624b85a578007a00312338d3adecaf8" + "reference": "1d077bd682f7c0794d5f5b794b16e2b30febec6b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/9a90698d4624b85a578007a00312338d3adecaf8", - "reference": "9a90698d4624b85a578007a00312338d3adecaf8", + "url": "https://api.github.com/repos/symfony/console/zipball/1d077bd682f7c0794d5f5b794b16e2b30febec6b", + "reference": "1d077bd682f7c0794d5f5b794b16e2b30febec6b", "shasum": "" }, "require": { @@ -5072,7 +5072,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/5.x" + "source": "https://github.com/symfony/console/tree/v5.3.0-BETA1" }, "funding": [ { @@ -5088,7 +5088,7 @@ "type": "tidelift" } ], - "time": "2021-04-09T09:54:19+00:00" + "time": "2021-04-16T17:36:28+00:00" }, { "name": "symfony/deprecation-contracts", @@ -5140,7 +5140,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/main" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.4.0" }, "funding": [ { @@ -5164,12 +5164,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170" + "reference": "053f7184175d5417c933817341c5cc0053ddacd5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/5601e09b69f26c1828b13b6bb87cb07cddba3170", - "reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/053f7184175d5417c933817341c5cc0053ddacd5", + "reference": "053f7184175d5417c933817341c5cc0053ddacd5", "shasum": "" }, "require": { @@ -5182,7 +5182,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5222,7 +5222,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/main" }, "funding": [ { @@ -5238,7 +5238,7 @@ "type": "tidelift" } ], - "time": "2021-01-22T09:19:47+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { "name": "symfony/polyfill-intl-normalizer", @@ -5246,12 +5246,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248" + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/43a0283138253ed1d48d352ab6d0bdb3f809f248", - "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", "shasum": "" }, "require": { @@ -5264,7 +5264,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5307,7 +5307,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/main" }, "funding": [ { @@ -5323,7 +5323,7 @@ "type": "tidelift" } ], - "time": "2021-01-22T09:19:47+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -5331,12 +5331,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "5232de97ee3b75b0360528dae24e73db49566ab1" + "reference": "298b87cbbe99cb2c9f88fb1d1de78833b64b483e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/5232de97ee3b75b0360528dae24e73db49566ab1", - "reference": "5232de97ee3b75b0360528dae24e73db49566ab1", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/298b87cbbe99cb2c9f88fb1d1de78833b64b483e", + "reference": "298b87cbbe99cb2c9f88fb1d1de78833b64b483e", "shasum": "" }, "require": { @@ -5349,7 +5349,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5388,7 +5388,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-mbstring/tree/main" }, "funding": [ { @@ -5404,7 +5404,7 @@ "type": "tidelift" } ], - "time": "2021-01-22T09:19:47+00:00" + "time": "2021-04-19T09:32:22+00:00" }, { "name": "symfony/polyfill-php73", @@ -5412,12 +5412,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2" + "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", - "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010", + "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010", "shasum": "" }, "require": { @@ -5427,7 +5427,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5468,7 +5468,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-php73/tree/main" }, "funding": [ { @@ -5484,7 +5484,7 @@ "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { "name": "symfony/polyfill-php80", @@ -5492,12 +5492,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91" + "reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91", - "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/eca0bf41ed421bed1b57c4958bab16aa86b757d0", + "reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0", "shasum": "" }, "require": { @@ -5507,7 +5507,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5552,7 +5552,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.22.1" + "source": "https://github.com/symfony/polyfill-php80/tree/main" }, "funding": [ { @@ -5568,7 +5568,7 @@ "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { "name": "symfony/service-contracts", @@ -5632,7 +5632,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/main" + "source": "https://github.com/symfony/service-contracts/tree/v2.4.0" }, "funding": [ { @@ -5716,7 +5716,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/5.x" + "source": "https://github.com/symfony/string/tree/v5.3.0-BETA1" }, "funding": [ {