From d42f6738a9badc02176913b21b72e01c461681d8 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 30 May 2023 14:07:12 +1200 Subject: [PATCH] Update framework to fix route mismatches --- composer.json | 2 +- composer.lock | 30 ++++++++++++------- .../e2e/Services/Databases/DatabasesBase.php | 6 ++++ 3 files changed, 27 insertions(+), 11 deletions(-) diff --git a/composer.json b/composer.json index 0ba26540b..5b497d911 100644 --- a/composer.json +++ b/composer.json @@ -51,7 +51,7 @@ "utopia-php/config": "0.2.*", "utopia-php/database": "0.36.*", "utopia-php/domains": "1.1.*", - "utopia-php/framework": "0.28.*", + "utopia-php/framework": "dev-fix-route-mistmatch as 0.28.1", "utopia-php/image": "0.5.*", "utopia-php/locale": "0.4.*", "utopia-php/logger": "0.3.*", diff --git a/composer.lock b/composer.lock index 6f5b086b9..67188b7a8 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": "3eadbfe5543aafdf8682ea0465159e3c", + "content-hash": "6b8b1c976fb0a44257d3820fe87af179", "packages": [ { "name": "adhocore/jwt", @@ -2218,23 +2218,24 @@ }, { "name": "utopia-php/framework", - "version": "0.28.1", + "version": "dev-fix-route-mistmatch", "source": { "type": "git", "url": "https://github.com/utopia-php/framework.git", - "reference": "7f22c556fc5991e54e5811a68fb39809b21bda55" + "reference": "e8e12a880539679010b86576e843be9f4c7f3329" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/framework/zipball/7f22c556fc5991e54e5811a68fb39809b21bda55", - "reference": "7f22c556fc5991e54e5811a68fb39809b21bda55", + "url": "https://api.github.com/repos/utopia-php/framework/zipball/e8e12a880539679010b86576e843be9f4c7f3329", + "reference": "e8e12a880539679010b86576e843be9f4c7f3329", "shasum": "" }, "require": { - "php": ">=8.0.0" + "php": ">=8.0" }, "require-dev": { "laravel/pint": "^1.2", + "phpstan/phpstan": "1.9.x-dev", "phpunit/phpunit": "^9.5.25", "vimeo/psalm": "4.27.0" }, @@ -2256,9 +2257,9 @@ ], "support": { "issues": "https://github.com/utopia-php/framework/issues", - "source": "https://github.com/utopia-php/framework/tree/0.28.1" + "source": "https://github.com/utopia-php/framework/tree/fix-route-mistmatch" }, - "time": "2023-03-02T08:16:01+00:00" + "time": "2023-05-30T01:59:18+00:00" }, { "name": "utopia-php/image", @@ -5644,9 +5645,18 @@ "time": "2023-05-03T19:06:57+00:00" } ], - "aliases": [], + "aliases": [ + { + "package": "utopia-php/framework", + "version": "dev-fix-route-mistmatch", + "alias": "0.28.1", + "alias_normalized": "0.28.1.0" + } + ], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "utopia-php/framework": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { diff --git a/tests/e2e/Services/Databases/DatabasesBase.php b/tests/e2e/Services/Databases/DatabasesBase.php index 0648db849..88849a4c8 100644 --- a/tests/e2e/Services/Databases/DatabasesBase.php +++ b/tests/e2e/Services/Databases/DatabasesBase.php @@ -1086,6 +1086,12 @@ trait DatabasesBase $this->assertEquals(400, $document4['headers']['status-code']); + // Delete document 4 with incomplete path + $this->assertEquals(404, $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()))['headers']['status-code']); + return $data; }