From 2417cea7b85463d4fec491d61aba0355ed00d2ce Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Fri, 12 Jan 2024 14:36:31 +0800 Subject: [PATCH 01/18] wip --- composer.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index e80cac1..0d50189 100644 --- a/composer.json +++ b/composer.json @@ -18,10 +18,10 @@ "require": { "ext-json": "*", "php": "^7.4|^8.0", - "illuminate/contracts": "^7.20|^8.19|^9.0|^10.0", - "illuminate/database": "^7.20|^8.19|^9.0|^10.0", - "illuminate/queue": "^7.20|^8.19|^9.0|^10.0", - "illuminate/support": "^7.20|^8.19|^9.0|^10.0", + "illuminate/contracts": "^7.20|^8.19|^9.0|^10.0|^11.0", + "illuminate/database": "^7.20|^8.19|^9.0|^10.0|^11.0", + "illuminate/queue": "^7.20|^8.19|^9.0|^10.0|^11.0", + "illuminate/support": "^7.20|^8.19|^9.0|^10.0|^11.0", "spatie/backtrace": "^1.0", "spatie/ray": "^1.37", "symfony/stopwatch": "4.2|^5.1|^6.0|^7.0", @@ -29,11 +29,11 @@ }, "require-dev": { "guzzlehttp/guzzle": "^7.3", - "laravel/framework": "^7.20|^8.19|^9.0|^10.0", - "orchestra/testbench-core": "^5.0|^6.0|^7.0|^8.0", + "laravel/framework": "^7.20|^8.19|^9.0|^10.0|^11.0", + "orchestra/testbench-core": "^5.0|^6.0|^7.0|^8.0|^9.0", "pestphp/pest": "^1.22", "phpstan/phpstan": "^0.12.93", - "phpunit/phpunit": "^9.3", + "phpunit/phpunit": "^9.3|^10.1", "spatie/pest-plugin-snapshots": "^1.1" }, "autoload": { From 505bcb52f09e19b61cbb0d05d36ec27cb4821b6b Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Fri, 12 Jan 2024 14:42:20 +0800 Subject: [PATCH 02/18] wip --- .github/workflows/run-tests.yml | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 3178ec0..6595b62 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -9,8 +9,8 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest] - php: [8.2, 8.1, 8.0, 7.4] - laravel: [10.*, 9.*, 8.*, 7.*] + php: [8.3, 8.2, 8.1, 8.0, 7.4] + laravel: [11.*, 10.*, 9.*, 8.*, 7.*] dependency-version: [prefer-stable] include: - laravel: 10.* @@ -22,20 +22,28 @@ jobs: - laravel: 7.* testbench: 5.* exclude: - - laravel: 7.* - php: 8.2 - - laravel: 7.* + - laravel: 11.* php: 8.1 - - laravel: 9.* + - laravel: 11.* + php: 8.0 + - laravel: 11.* php: 7.4 - - laravel: 9.* - php: 7.3 - laravel: 10.* php: 8.0 - laravel: 10.* php: 7.4 - - laravel: 10.* - php: 7.3 + - laravel: 9.* + php: 8.3 + - laravel: 9.* + php: 7.4 + - laravel: 8.* + php: 8.3 + - laravel: 7.* + php: 8.3 + - laravel: 7.* + php: 8.2 + - laravel: 7.* + php: 8.1 name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} From 09ede1444f33e1e78206591b3c451fcf82a98714 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Fri, 12 Jan 2024 14:46:35 +0800 Subject: [PATCH 03/18] wip --- .github/workflows/run-tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 6595b62..80ad33b 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -13,6 +13,8 @@ jobs: laravel: [11.*, 10.*, 9.*, 8.*, 7.*] dependency-version: [prefer-stable] include: + - laravel: 11.* + testbench: 9.* - laravel: 10.* testbench: 8.* - laravel: 9.* From 0f88cba0bb857a9e5306190ddb643e93110da623 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Fri, 12 Jan 2024 14:52:31 +0800 Subject: [PATCH 04/18] wip --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 0d50189..3c0d200 100644 --- a/composer.json +++ b/composer.json @@ -31,10 +31,10 @@ "guzzlehttp/guzzle": "^7.3", "laravel/framework": "^7.20|^8.19|^9.0|^10.0|^11.0", "orchestra/testbench-core": "^5.0|^6.0|^7.0|^8.0|^9.0", - "pestphp/pest": "^1.22", + "pestphp/pest": "^1.22|^2.0", "phpstan/phpstan": "^0.12.93", "phpunit/phpunit": "^9.3|^10.1", - "spatie/pest-plugin-snapshots": "^1.1" + "spatie/pest-plugin-snapshots": "^1.1|^2.0" }, "autoload": { "psr-4": { From 114af5aa3aae207d6f2bc62327a8383d7b8be73f Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Fri, 12 Jan 2024 14:55:12 +0800 Subject: [PATCH 05/18] wip --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 3c0d200..b005005 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "illuminate/queue": "^7.20|^8.19|^9.0|^10.0|^11.0", "illuminate/support": "^7.20|^8.19|^9.0|^10.0|^11.0", "spatie/backtrace": "^1.0", - "spatie/ray": "^1.37", + "spatie/ray": "^1.37|dev-main", "symfony/stopwatch": "4.2|^5.1|^6.0|^7.0", "zbateson/mail-mime-parser": "^1.3.1|^2.0" }, From fabfb2fb9911bb6b8c189c6347518a3f9ad0a447 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Fri, 12 Jan 2024 15:50:49 +0800 Subject: [PATCH 06/18] wip Signed-off-by: Mior Muhammad Zaki --- composer.json | 4 ++-- tests/Unit/MarkdownTest.php | 11 +++++++++- ...ender_and_send_markdown_for_Pest_2__1.json | 20 +++++++++++++++++++ 3 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 tests/__snapshots__/MarkdownTest__it_can_render_and_send_markdown_for_Pest_2__1.json diff --git a/composer.json b/composer.json index b005005..655d841 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "illuminate/queue": "^7.20|^8.19|^9.0|^10.0|^11.0", "illuminate/support": "^7.20|^8.19|^9.0|^10.0|^11.0", "spatie/backtrace": "^1.0", - "spatie/ray": "^1.37|dev-main", + "spatie/ray": "dev-main", "symfony/stopwatch": "4.2|^5.1|^6.0|^7.0", "zbateson/mail-mime-parser": "^1.3.1|^2.0" }, @@ -31,7 +31,7 @@ "guzzlehttp/guzzle": "^7.3", "laravel/framework": "^7.20|^8.19|^9.0|^10.0|^11.0", "orchestra/testbench-core": "^5.0|^6.0|^7.0|^8.0|^9.0", - "pestphp/pest": "^1.22|^2.0", + "pestphp/pest": "^1.22", "phpstan/phpstan": "^0.12.93", "phpunit/phpunit": "^9.3|^10.1", "spatie/pest-plugin-snapshots": "^1.1|^2.0" diff --git a/tests/Unit/MarkdownTest.php b/tests/Unit/MarkdownTest.php index c450431..2484a94 100644 --- a/tests/Unit/MarkdownTest.php +++ b/tests/Unit/MarkdownTest.php @@ -1,7 +1,16 @@ markdown('## Hello World!'); assertMatchesOsSafeSnapshot($this->client->sentRequests()); -}); +})->skip(version_compare(version(), '2.0.0', '>=')); + + +it('can render and send markdown for Pest 2', function () { + ray()->markdown('## Hello World!'); + + assertMatchesOsSafeSnapshot($this->client->sentRequests()); +})->skip(version_compare(version(), '2.0.0', '<')); diff --git a/tests/__snapshots__/MarkdownTest__it_can_render_and_send_markdown_for_Pest_2__1.json b/tests/__snapshots__/MarkdownTest__it_can_render_and_send_markdown_for_Pest_2__1.json new file mode 100644 index 0000000..59dfacd --- /dev/null +++ b/tests/__snapshots__/MarkdownTest__it_can_render_and_send_markdown_for_Pest_2__1.json @@ -0,0 +1,20 @@ +[ + { + "uuid": "fakeUuid", + "payloads": [ + { + "type": "custom", + "content": { + "content": "