From b0cbd0b6980427b12099ef2f696ad93f4fbe8405 Mon Sep 17 00:00:00 2001 From: Arman <407448+armanist@users.noreply.github.com> Date: Sun, 22 Jun 2025 21:40:07 +0400 Subject: [PATCH 1/6] Requiring core version 2.9.7 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 2e9dad3..a5c7d7d 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "license": "MIT", "type": "project", "require": { - "quantum/framework": "dev-master", + "quantum/framework": "^2.9.7", "fakerphp/faker": "^1.15", "bluemmb/faker-picsum-photos-provider": "^2.0", "doctrine/annotations": "^2.0", From 96b9e08cdb59733757b02e779fc8c494c5995c65 Mon Sep 17 00:00:00 2001 From: Arman <407448+armanist@users.noreply.github.com> Date: Sat, 19 Jul 2025 15:15:09 +0400 Subject: [PATCH 2/6] Keeping uploads folder for tests --- tests/_root/public/uploads/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 tests/_root/public/uploads/.gitkeep diff --git a/tests/_root/public/uploads/.gitkeep b/tests/_root/public/uploads/.gitkeep deleted file mode 100644 index e69de29..0000000 From d46b5cb72feb4e94cc86f848f97c84ad0e2df3fe Mon Sep 17 00:00:00 2001 From: Arman <407448+armanist@users.noreply.github.com> Date: Sat, 19 Jul 2025 15:16:46 +0400 Subject: [PATCH 3/6] Correcting the `request()` method to leverage from `Request::create()` --- tests/Feature/AppTestCase.php | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/tests/Feature/AppTestCase.php b/tests/Feature/AppTestCase.php index 22a0e02..3da7320 100644 --- a/tests/Feature/AppTestCase.php +++ b/tests/Feature/AppTestCase.php @@ -73,25 +73,13 @@ public function tearDown(): void public function request( string $method, string $url, - array $options = [], + array $params = [], array $headers = [], - string $contentType = 'application/x-www-form-urlencoded' + array $files = [] ): Response { - $_SERVER['REQUEST_METHOD'] = strtoupper($method); - $_SERVER['CONTENT_TYPE'] = $contentType; - $_SERVER['REQUEST_URI'] = $url; - - if (!empty($headers)) { - foreach ($headers as $name => $value) { - $_SERVER['HTTP_' . strtoupper($name)] = $value; - } - } - - Request::create(strtoupper($method), $url, $options); - + Request::create($method, $url, $params, $headers, $files); self::$app->start(); - return new Response(); } From a3e5235f23687fceb2da4dc7d400ea07f2ccb5a4 Mon Sep 17 00:00:00 2001 From: Arman <407448+armanist@users.noreply.github.com> Date: Sat, 19 Jul 2025 15:18:36 +0400 Subject: [PATCH 4/6] Updating doc-blocks and updating composer.json to use `dev-master` of quantum framework --- composer.json | 5 +++-- shared/Commands/DemoCommand.php | 7 +++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index a5c7d7d..16a224b 100644 --- a/composer.json +++ b/composer.json @@ -5,13 +5,14 @@ "license": "MIT", "type": "project", "require": { - "quantum/framework": "^2.9.7", + "quantum/framework": "dev-master", "fakerphp/faker": "^1.15", "bluemmb/faker-picsum-photos-provider": "^2.0", "doctrine/annotations": "^2.0", "voku/html-min": "^4.5", "league/commonmark": "^1.6", - "ezyang/htmlpurifier": "^4.18" + "ezyang/htmlpurifier": "^4.18", + "povils/figlet": "^0.1.0" }, "require-dev": { "phpunit/phpunit": "^9.0", diff --git a/shared/Commands/DemoCommand.php b/shared/Commands/DemoCommand.php index 17dc14f..e2a3c28 100644 --- a/shared/Commands/DemoCommand.php +++ b/shared/Commands/DemoCommand.php @@ -9,7 +9,7 @@ * @author Arman Ag. * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) * @link http://quantum.softberg.org/ - * @since 2.9.7 + * @since 2.9.8 */ namespace Shared\Commands; @@ -268,9 +268,12 @@ private function newUserData(string $role = ''): array * Post data * @param $user * @return array - * @throws ErrorException * @throws BaseException + * @throws ConfigException + * @throws DiException + * @throws ErrorException * @throws HttpClientException + * @throws ReflectionException */ private function newPostData($user): array { From 1985dfba28087785950ee1ddbda08c7d7f7e9750 Mon Sep 17 00:00:00 2001 From: Arman <407448+armanist@users.noreply.github.com> Date: Sat, 19 Jul 2025 16:31:36 +0400 Subject: [PATCH 5/6] Keeping uploads folder for tests --- tests/_root/public/uploads/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/_root/public/uploads/.gitkeep diff --git a/tests/_root/public/uploads/.gitkeep b/tests/_root/public/uploads/.gitkeep new file mode 100644 index 0000000..e69de29 From d4b7e6ac24be99f22f2c55270bf2a47be4575143 Mon Sep 17 00:00:00 2001 From: Arman <407448+armanist@users.noreply.github.com> Date: Sat, 19 Jul 2025 17:01:53 +0400 Subject: [PATCH 6/6] Removing figlet package from project since core already uses it --- composer.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 16a224b..2e9dad3 100644 --- a/composer.json +++ b/composer.json @@ -11,8 +11,7 @@ "doctrine/annotations": "^2.0", "voku/html-min": "^4.5", "league/commonmark": "^1.6", - "ezyang/htmlpurifier": "^4.18", - "povils/figlet": "^0.1.0" + "ezyang/htmlpurifier": "^4.18" }, "require-dev": { "phpunit/phpunit": "^9.0",