From c876913037bf7427f6ffb3b43a59c0c1b3673234 Mon Sep 17 00:00:00 2001
From: Maksim Stepanov <17935127+delatrie@users.noreply.github.com>
Date: Fri, 1 May 2026 16:47:41 +0700
Subject: [PATCH 01/12] deps: bump squizlabs/php_codesniffer to ^4.0.1
---
composer.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/composer.json b/composer.json
index 7cdc834..7bf75f6 100644
--- a/composer.json
+++ b/composer.json
@@ -30,7 +30,7 @@
"psalm/plugin-phpunit": "^0.19.0",
"remorhaz/php-json-data": "^0.5.3",
"remorhaz/php-json-path": "^0.7.7",
- "squizlabs/php_codesniffer": "^3.7.2",
+ "squizlabs/php_codesniffer": "^4.0.1",
"vimeo/psalm": "^5.12"
},
"autoload": {
From ef63a876f1f753b37754dba41d2aa12d3604172d Mon Sep 17 00:00:00 2001
From: Maksim Stepanov <17935127+delatrie@users.noreply.github.com>
Date: Fri, 1 May 2026 16:47:52 +0700
Subject: [PATCH 02/12] chore: remove autogenerated files from phpcs
---
phpcs.xml.dist | 2 ++
1 file changed, 2 insertions(+)
diff --git a/phpcs.xml.dist b/phpcs.xml.dist
index 227a3bb..0ba55b0 100644
--- a/phpcs.xml.dist
+++ b/phpcs.xml.dist
@@ -4,6 +4,8 @@
src
test
+ test/codeception/_support/_generated/*
+ test/codeception-report/_support/_generated/*
From aed70329e73739ac0ea87dcad8bf519d00abb95f Mon Sep 17 00:00:00 2001
From: Maksim Stepanov <17935127+delatrie@users.noreply.github.com>
Date: Fri, 1 May 2026 16:48:49 +0700
Subject: [PATCH 03/12] deps: enable psalm 6 and plugin-phpunit 0.20
---
composer.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/composer.json b/composer.json
index 7bf75f6..dc4a984 100644
--- a/composer.json
+++ b/composer.json
@@ -27,11 +27,11 @@
"allure-framework/allure-php-commons": "^2.3.1"
},
"require-dev": {
- "psalm/plugin-phpunit": "^0.19.0",
+ "psalm/plugin-phpunit": "^0.19.0 || ^0.20.1",
"remorhaz/php-json-data": "^0.5.3",
"remorhaz/php-json-path": "^0.7.7",
"squizlabs/php_codesniffer": "^4.0.1",
- "vimeo/psalm": "^5.12"
+ "vimeo/psalm": "^5.26.1 || ^6.16.1"
},
"autoload": {
"psr-4": {
From 76d6e34facdbb698ef80826c992713cf1e20adf2 Mon Sep 17 00:00:00 2001
From: Maksim Stepanov <17935127+delatrie@users.noreply.github.com>
Date: Fri, 1 May 2026 16:49:14 +0700
Subject: [PATCH 04/12] chore: fix psalm errors
---
src/Internal/GherkinProvider.php | 4 ++--
src/Internal/UnitInfoBuilder.php | 7 ++++++-
test/codeception-report/unit/StepsTest.php | 3 +++
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/Internal/GherkinProvider.php b/src/Internal/GherkinProvider.php
index 86a8345..415768b 100644
--- a/src/Internal/GherkinProvider.php
+++ b/src/Internal/GherkinProvider.php
@@ -36,8 +36,8 @@ public function getLabels(): array
return array_map(
fn (string $value) => Label::feature($value),
[
- ...array_values($this->test->getFeatureNode()->getTags()),
- ...array_values($this->test->getScenarioNode()->getTags()),
+ ...$this->test->getFeatureNode()->getTags(),
+ ...$this->test->getScenarioNode()->getTags(),
],
);
}
diff --git a/src/Internal/UnitInfoBuilder.php b/src/Internal/UnitInfoBuilder.php
index 61dfae9..524be55 100644
--- a/src/Internal/UnitInfoBuilder.php
+++ b/src/Internal/UnitInfoBuilder.php
@@ -22,10 +22,15 @@ public function build(?string $host, ?string $thread): TestInfo
$index = $this->test->getMetadata()->getIndex();
$dataLabel = is_int($index) ? "#$index" : $index;
+ /**
+ * @var null|string
+ */
+ $class = $fields['class'];
+
return new TestInfo(
originalTest: $this->test,
signature: $this->test->getSignature(),
- class: $fields['class'] ?? null,
+ class: $class ?? null,
method: $this->test->getMetadata()->getName(),
dataLabel: $dataLabel,
host: $host,
diff --git a/test/codeception-report/unit/StepsTest.php b/test/codeception-report/unit/StepsTest.php
index bbfefb5..fbb53de 100644
--- a/test/codeception-report/unit/StepsTest.php
+++ b/test/codeception-report/unit/StepsTest.php
@@ -85,6 +85,9 @@ private function createFailingStep(string $name, string $failure): Step
return new class ($failure, $name) extends Meta {
private string $failure;
+ /**
+ * @param array $arguments
+ */
public function __construct(string $failure, string $action, array $arguments = [])
{
parent::__construct($action, $arguments);
From 592390f2e9539d0b78297fba23e982fbb13b0f58 Mon Sep 17 00:00:00 2001
From: Maksim Stepanov <17935127+delatrie@users.noreply.github.com>
Date: Fri, 1 May 2026 16:49:57 +0700
Subject: [PATCH 05/12] deps: bump actions/checkout to v6
---
.github/workflows/build.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 7326fda..c610321 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -30,7 +30,7 @@ jobs:
- "--prefer-lowest"
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
- name: Set up PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
From 5c02e27b85a6c94040e15b0804c85b95e1d95b75 Mon Sep 17 00:00:00 2001
From: Maksim Stepanov <17935127+delatrie@users.noreply.github.com>
Date: Fri, 1 May 2026 16:51:01 +0700
Subject: [PATCH 06/12] chore: remove --prefer-lowest from build matrix
---
.github/workflows/build.yml | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index c610321..e50b428 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -11,7 +11,7 @@ on:
jobs:
tests:
- name: PHP ${{ matrix.php-version }} on ${{ matrix.os }} (${{ matrix.composer-options }})
+ name: Test on ${{ matrix.os }} php${{ matrix.php-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
@@ -25,9 +25,7 @@ jobs:
- ubuntu-latest
- windows-latest
- macOS-latest
- composer-options:
- - ""
- - "--prefer-lowest"
+
steps:
- name: Checkout
uses: actions/checkout@v6
@@ -44,10 +42,7 @@ jobs:
run: composer validate
- name: Install dependencies
- run: composer update
- --prefer-dist
- --no-progress
- ${{ matrix.composer-options }}
+ run: composer update --prefer-dist --no-progress
- name: Run tests
run: composer test
From 7d4db4476f247cd337badd610cbda45410f3e2af Mon Sep 17 00:00:00 2001
From: Maksim Stepanov <17935127+delatrie@users.noreply.github.com>
Date: Fri, 1 May 2026 16:51:33 +0700
Subject: [PATCH 07/12] chore: remove -latest from CI job name
---
.github/workflows/build.yml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index e50b428..6f26e2b 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -12,7 +12,7 @@ on:
jobs:
tests:
name: Test on ${{ matrix.os }} php${{ matrix.php-version }}
- runs-on: ${{ matrix.os }}
+ runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
@@ -22,9 +22,9 @@ jobs:
- "8.2"
- "8.3"
os:
- - ubuntu-latest
- - windows-latest
- - macOS-latest
+ - ubuntu
+ - windows
+ - macOS
steps:
- name: Checkout
From 37edc4925c60ef8e859ccdbf22a77915c5611f2a Mon Sep 17 00:00:00 2001
From: Maksim Stepanov <17935127+delatrie@users.noreply.github.com>
Date: Fri, 1 May 2026 16:51:58 +0700
Subject: [PATCH 08/12] chore: show tested codecept version
---
.github/workflows/build.yml | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 6f26e2b..959790b 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -44,5 +44,12 @@ jobs:
- name: Install dependencies
run: composer update --prefer-dist --no-progress
+ - name: Show Codeception version
+ run: |
+ echo "Tested against Codeception **v$(
+ composer show codeception/codeception --format json | jq -r '.versions[0]'
+ )**" >> "$GITHUB_STEP_SUMMARY"
+ shell: bash
+
- name: Run tests
run: composer test
From 098a5a9f132f44ad5ffe4e38016792074ac9a520 Mon Sep 17 00:00:00 2001
From: Maksim Stepanov <17935127+delatrie@users.noreply.github.com>
Date: Fri, 1 May 2026 16:59:46 +0700
Subject: [PATCH 09/12] chore: add explicit workflow permissions
---
.github/workflows/build.yml | 3 +++
.github/workflows/labels-verify.yml | 3 +++
2 files changed, 6 insertions(+)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 959790b..364d7e1 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -9,6 +9,9 @@ on:
- 'main'
- 'hotfix-*'
+permissions:
+ contents: read
+
jobs:
tests:
name: Test on ${{ matrix.os }} php${{ matrix.php-version }}
diff --git a/.github/workflows/labels-verify.yml b/.github/workflows/labels-verify.yml
index 2c3bd2a..74f9a86 100644
--- a/.github/workflows/labels-verify.yml
+++ b/.github/workflows/labels-verify.yml
@@ -4,6 +4,9 @@ on:
pull_request:
types: [opened, labeled, unlabeled, synchronize]
+permissions:
+ contents: read
+
jobs:
triage:
runs-on: ubuntu-latest
From dc055889c4fb7142e02a1ef7a6ac4457e62451f3 Mon Sep 17 00:00:00 2001
From: Maksim Stepanov <17935127+delatrie@users.noreply.github.com>
Date: Fri, 1 May 2026 17:00:01 +0700
Subject: [PATCH 10/12] chore: add type:doc to labels-verify
---
.github/workflows/labels-verify.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/labels-verify.yml b/.github/workflows/labels-verify.yml
index 74f9a86..a79f60f 100644
--- a/.github/workflows/labels-verify.yml
+++ b/.github/workflows/labels-verify.yml
@@ -13,4 +13,4 @@ jobs:
steps:
- uses: baev/match-label-action@master
with:
- allowed: 'type:bug,type:new feature,type:improvement,type:dependencies,type:internal,type:invalid'
+ allowed: 'type:bug,type:new feature,type:improvement,type:dependencies,type:internal,type:invalid,type:docs'
From 30f8fe56386f3791dd2dda57cf7728436105ca51 Mon Sep 17 00:00:00 2001
From: Maksim Stepanov <17935127+delatrie@users.noreply.github.com>
Date: Fri, 1 May 2026 17:28:02 +0700
Subject: [PATCH 11/12] chore: separate static and runtime checks in CI
---
.github/workflows/build.yml | 37 ++++++++++++++++++++++++++++++++-----
1 file changed, 32 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 364d7e1..5acfb09 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -13,6 +13,30 @@ permissions:
contents: read
jobs:
+ static-checks:
+ name: Run static checks
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v6
+
+ - name: Set up PHP ${{ matrix.php-version }}
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php-version }}
+
+ - name: Validate composer.json
+ run: composer validate
+
+ - name: Install dependencies
+ run: composer update --prefer-dist --no-progress
+
+ - name: Run PHP_CodeSniffer
+ run: vendor/bin/phpcs -sp
+
+ - name: Run Psalm
+ run: vendor/bin/psalm --shepherd
+
tests:
name: Test on ${{ matrix.os }} php${{ matrix.php-version }}
runs-on: ${{ matrix.os }}-latest
@@ -41,9 +65,6 @@ jobs:
coverage: xdebug
ini-values: error_reporting=E_ALL
- - name: Validate composer.json and composer.lock
- run: composer validate
-
- name: Install dependencies
run: composer update --prefer-dist --no-progress
@@ -54,5 +75,11 @@ jobs:
)**" >> "$GITHUB_STEP_SUMMARY"
shell: bash
- - name: Run tests
- run: composer test
+ - name: Run unit tests tests
+ run: composer test-unit
+
+ - name: Run samples
+ run: composer test-report-generate
+
+ - name: Assert samples
+ run: composer test-report-check
From d3dfc42f8656755caad28276b0386e366c37f961 Mon Sep 17 00:00:00 2001
From: Maksim Stepanov <17935127+delatrie@users.noreply.github.com>
Date: Fri, 1 May 2026 17:30:56 +0700
Subject: [PATCH 12/12] chore: add concurrency to build workflow
---
.github/workflows/build.yml | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 5acfb09..3d02762 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -12,6 +12,10 @@ on:
permissions:
contents: read
+concurrency:
+ group: ${{ github.ref }}
+ cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
+
jobs:
static-checks:
name: Run static checks
@@ -20,10 +24,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v6
- - name: Set up PHP ${{ matrix.php-version }}
+ - name: Set up PHP
uses: shivammathur/setup-php@v2
with:
- php-version: ${{ matrix.php-version }}
+ php-version: "8.3"
- name: Validate composer.json
run: composer validate