From 7b56613b58c725fb7cfe08a5b0718eceeae7e39e Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Thu, 19 Aug 2021 10:54:55 +0545 Subject: [PATCH] update framework --- app/controllers/general.php | 2 +- app/controllers/mock.php | 4 +- app/controllers/shared/api.php | 2 +- composer.json | 2 +- composer.lock | 44 +++++++++---------- .../Specification/Format/OpenAPI3.php | 2 +- .../Specification/Format/Swagger2.php | 2 +- 7 files changed, 29 insertions(+), 29 deletions(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index fa8f7b9cb5..5f9117f900 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -319,7 +319,7 @@ App::error(function ($error, $utopia, $request, $response, $layout, $project) { if($route) { Console::error('[Error] Method: '.$route->getMethod()); - Console::error('[Error] URL: '.$route->getURL()); + Console::error('[Error] URL: '.$route->getPath()); } Console::error('[Error] Type: '.get_class($error)); diff --git a/app/controllers/mock.php b/app/controllers/mock.php index 6207aae969..9c0a7ab72c 100644 --- a/app/controllers/mock.php +++ b/app/controllers/mock.php @@ -518,7 +518,7 @@ App::shutdown(function($utopia, $response, $request) { throw new Exception('Failed to read results', 500); } - $result[$route->getMethod() . ':' . $route->getURL()] = true; + $result[$route->getMethod() . ':' . $route->getPath()] = true; $tests = \array_merge($tests, $result); @@ -526,5 +526,5 @@ App::shutdown(function($utopia, $response, $request) { throw new Exception('Failed to save results', 500); } - $response->dynamic(new Document(['result' => $route->getMethod() . ':' . $route->getURL() . ':passed']), Response::MODEL_MOCK); + $response->dynamic(new Document(['result' => $route->getMethod() . ':' . $route->getPath() . ':passed']), Response::MODEL_MOCK); }, ['utopia', 'response', 'request'], 'mock'); \ No newline at end of file diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 81ee8798b3..3707eebfad 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -41,7 +41,7 @@ App::init(function ($utopia, $request, $response, $project, $user, $events, $aud ->setParam('{userId}', $user->getId()) ->setParam('{userAgent}', $request->getUserAgent('')) ->setParam('{ip}', $request->getIP()) - ->setParam('{url}', $request->getHostname().$route->getURL()) + ->setParam('{url}', $request->getHostname().$route->getPath()) ; // TODO make sure we get array here diff --git a/composer.json b/composer.json index 76aa71cf7d..239215fb56 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,7 @@ "appwrite/php-clamav": "1.1.*", "appwrite/php-runtimes": "0.4.*", - "utopia-php/framework": "0.17.*", + "utopia-php/framework": "0.18.*", "utopia-php/abuse": "0.6.*", "utopia-php/analytics": "0.2.*", "utopia-php/audit": "0.6.*", diff --git a/composer.lock b/composer.lock index db07f5df2b..7a08af2d48 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": "7de5dc8a9fe3cbc14696c685d1cdddee", + "content-hash": "3bd55da6a3f195eb4ff3e7b4783be12a", "packages": [ { "name": "adhocore/jwt", @@ -1666,22 +1666,22 @@ }, { "name": "utopia-php/abuse", - "version": "0.6.2", + "version": "0.6.3", "source": { "type": "git", "url": "https://github.com/utopia-php/abuse.git", - "reference": "4cd9c16610f7398d2e1737663ef682fa721ae736" + "reference": "d63e928c2c50b367495a499a85ba9806ee274c5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/abuse/zipball/4cd9c16610f7398d2e1737663ef682fa721ae736", - "reference": "4cd9c16610f7398d2e1737663ef682fa721ae736", + "url": "https://api.github.com/repos/utopia-php/abuse/zipball/d63e928c2c50b367495a499a85ba9806ee274c5e", + "reference": "d63e928c2c50b367495a499a85ba9806ee274c5e", "shasum": "" }, "require": { "ext-pdo": "*", "php": ">=7.4", - "utopia-php/database": "0.7.*" + "utopia-php/database": ">=0.6 <1.0" }, "require-dev": { "phpunit/phpunit": "^9.4", @@ -1713,9 +1713,9 @@ ], "support": { "issues": "https://github.com/utopia-php/abuse/issues", - "source": "https://github.com/utopia-php/abuse/tree/0.6.2" + "source": "https://github.com/utopia-php/abuse/tree/0.6.3" }, - "time": "2021-08-13T07:52:34+00:00" + "time": "2021-08-16T18:38:31+00:00" }, { "name": "utopia-php/analytics", @@ -1774,22 +1774,22 @@ }, { "name": "utopia-php/audit", - "version": "0.6.2", + "version": "0.6.3", "source": { "type": "git", "url": "https://github.com/utopia-php/audit.git", - "reference": "2ec39a53eb98a5f9d230550ad56c7c04de5d77df" + "reference": "d79b467fbc7d03e5e02f12cdeb08761507a60ca0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/audit/zipball/2ec39a53eb98a5f9d230550ad56c7c04de5d77df", - "reference": "2ec39a53eb98a5f9d230550ad56c7c04de5d77df", + "url": "https://api.github.com/repos/utopia-php/audit/zipball/d79b467fbc7d03e5e02f12cdeb08761507a60ca0", + "reference": "d79b467fbc7d03e5e02f12cdeb08761507a60ca0", "shasum": "" }, "require": { "ext-pdo": "*", "php": ">=7.4", - "utopia-php/database": "0.7.*" + "utopia-php/database": ">=0.6 <1.0" }, "require-dev": { "phpunit/phpunit": "^9.3", @@ -1821,9 +1821,9 @@ ], "support": { "issues": "https://github.com/utopia-php/audit/issues", - "source": "https://github.com/utopia-php/audit/tree/0.6.2" + "source": "https://github.com/utopia-php/audit/tree/0.6.3" }, - "time": "2021-08-13T08:05:20+00:00" + "time": "2021-08-16T18:49:55+00:00" }, { "name": "utopia-php/cache", @@ -2101,16 +2101,16 @@ }, { "name": "utopia-php/framework", - "version": "0.17.3", + "version": "0.18.0", "source": { "type": "git", "url": "https://github.com/utopia-php/framework.git", - "reference": "0274f6b3e49db2af0d702edf278ec7504dc99878" + "reference": "f577522a5eb8009967b893fb7ad4ee70d3f7c0db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/framework/zipball/0274f6b3e49db2af0d702edf278ec7504dc99878", - "reference": "0274f6b3e49db2af0d702edf278ec7504dc99878", + "url": "https://api.github.com/repos/utopia-php/framework/zipball/f577522a5eb8009967b893fb7ad4ee70d3f7c0db", + "reference": "f577522a5eb8009967b893fb7ad4ee70d3f7c0db", "shasum": "" }, "require": { @@ -2144,9 +2144,9 @@ ], "support": { "issues": "https://github.com/utopia-php/framework/issues", - "source": "https://github.com/utopia-php/framework/tree/0.17.3" + "source": "https://github.com/utopia-php/framework/tree/0.18.0" }, - "time": "2021-08-03T13:57:01+00:00" + "time": "2021-08-19T04:58:47+00:00" }, { "name": "utopia-php/image", @@ -6278,5 +6278,5 @@ "platform-overrides": { "php": "8.0" }, - "plugin-api-version": "2.0.0" + "plugin-api-version": "2.1.0" } diff --git a/src/Appwrite/Specification/Format/OpenAPI3.php b/src/Appwrite/Specification/Format/OpenAPI3.php index 02b3c315d0..353369eb65 100644 --- a/src/Appwrite/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/Specification/Format/OpenAPI3.php @@ -91,7 +91,7 @@ class OpenAPI3 extends Format $usedModels = []; foreach ($this->routes as $route) { /** @var \Utopia\Route $route */ - $url = \str_replace('/v1', '', $route->getURL()); + $url = \str_replace('/v1', '', $route->getPath()); $scope = $route->getLabel('scope', ''); $hide = $route->getLabel('sdk.hide', false); $consumes = [$route->getLabel('sdk.request.type', 'application/json')]; diff --git a/src/Appwrite/Specification/Format/Swagger2.php b/src/Appwrite/Specification/Format/Swagger2.php index d8a84e3ccf..d357283a02 100644 --- a/src/Appwrite/Specification/Format/Swagger2.php +++ b/src/Appwrite/Specification/Format/Swagger2.php @@ -89,7 +89,7 @@ class Swagger2 extends Format $usedModels = []; foreach ($this->routes as $route) { /** @var \Utopia\Route $route */ - $url = \str_replace('/v1', '', $route->getURL()); + $url = \str_replace('/v1', '', $route->getPath()); $scope = $route->getLabel('scope', ''); $hide = $route->getLabel('sdk.hide', false); $consumes = [$route->getLabel('sdk.request.type', 'application/json')];