From 6d4253e9088bf537f4eec201ae78a6beb681e65e Mon Sep 17 00:00:00 2001 From: Milad Rahimi Date: Sat, 2 Aug 2025 00:48:26 +0200 Subject: [PATCH 1/4] fix http error already sent in tests --- tests/Features/ViewTest.php | 2 ++ tests/Units/HttpPublisherTest.php | 1 + 2 files changed, 3 insertions(+) diff --git a/tests/Features/ViewTest.php b/tests/Features/ViewTest.php index e7f6179..a651b37 100644 --- a/tests/Features/ViewTest.php +++ b/tests/Features/ViewTest.php @@ -10,6 +10,7 @@ class ViewTest extends TestCase { /** + * @runInSeparateProcess * @throws Throwable */ public function test_with_the_sample_view() @@ -28,6 +29,7 @@ public function test_with_the_sample_view() } /** + * @runInSeparateProcess * @throws Throwable */ public function test_with_the_sample_view_and_status_201_and_headers() diff --git a/tests/Units/HttpPublisherTest.php b/tests/Units/HttpPublisherTest.php index eba105b..234060e 100644 --- a/tests/Units/HttpPublisherTest.php +++ b/tests/Units/HttpPublisherTest.php @@ -58,6 +58,7 @@ public function test_publish_a_array_response() } /** + * @runInSeparateProcess * @throws Throwable */ public function test_publish_a_standard_response() From 330f2709c6d38a82f57653211d97f57b4a8f1127 Mon Sep 17 00:00:00 2001 From: Milad Rahimi Date: Sat, 2 Aug 2025 00:49:56 +0200 Subject: [PATCH 2/4] add php 8.3 and 8.4 to ci --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2620463..a54bbc7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,8 @@ jobs: - php: '8.0' - php: '8.1' - php: '8.2' + - php: '8.3' + - php: '8.4' runs-on: ubuntu-latest steps: - name: Checkout From 6746b7152f7d44f1c84cb237bd4027413c1c697f Mon Sep 17 00:00:00 2001 From: Milad Rahimi Date: Sat, 2 Aug 2025 00:51:53 +0200 Subject: [PATCH 3/4] upgrade laminas-diactoros to v3 --- .github/workflows/ci.yml | 11 ++++++++++- composer.json | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a54bbc7..88fc2ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,9 @@ name: CI -on: [push, pull_request] + +on: + pull_request: + types: [opened, synchronize, reopened] + jobs: run: strategy: @@ -11,18 +15,23 @@ jobs: - php: '8.2' - php: '8.3' - php: '8.4' + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 + - name: Set up PHP uses: shivammathur/setup-php@v2 with: php-version: "${{ matrix.php }}" + - name: Install dependencies run: composer self-update && composer install && composer dump-autoload + - name: Run tests and collect coverage run: vendor/bin/phpunit --coverage-clover coverage.xml . + - name: Upload coverage to Codecov uses: codecov/codecov-action@v4-beta env: diff --git a/composer.json b/composer.json index bb7fe83..f1e5fe1 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ "php": ">=7.4", "ext-json": "*", "ext-mbstring": "*", - "laminas/laminas-diactoros": "^2", + "laminas/laminas-diactoros": "^3", "miladrahimi/phpcontainer": "^5" }, "require-dev": { From 92aaaba11b1aace082bed23ade05196b1d7e9162 Mon Sep 17 00:00:00 2001 From: Milad Rahimi Date: Sat, 2 Aug 2025 00:55:58 +0200 Subject: [PATCH 4/4] remove php 7.4 support --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 88fc2ef..383995d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,6 @@ jobs: strategy: matrix: include: - - php: '7.4' - php: '8.0' - php: '8.1' - php: '8.2'