From 2af50cfadbc5e340154265a6cfd7a2979027b123 Mon Sep 17 00:00:00 2001 From: Christopher Georg Date: Fri, 7 Nov 2025 14:59:13 +0100 Subject: [PATCH 1/2] ci: add tests for php 8.4 bump min versions --- .github/workflows/ci.yml | 11 +++++++---- composer.json | 14 +++++++------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cfd3fcf8..909914bf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,10 +21,11 @@ jobs: - '8.1' - '8.2' - '8.3' + - '8.4' fail-fast: false steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Setup PHP uses: shivammathur/setup-php@v2 with: @@ -45,12 +46,13 @@ jobs: - '8.1' - '8.2' - '8.3' + - '8.4' fail-fast: false env: APP_DEBUG: '1' # https://github.com/phpstan/phpstan-symfony/issues/37 steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Setup PHP uses: shivammathur/setup-php@v2 with: @@ -91,11 +93,12 @@ jobs: - '8.1' - '8.2' - '8.3' + - '8.4' fail-fast: false timeout-minutes: 20 steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Setup PHP uses: shivammathur/setup-php@v2 with: @@ -132,7 +135,7 @@ jobs: env: DISPLAY: ':99' steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup PHP uses: shivammathur/setup-php@v2 with: diff --git a/composer.json b/composer.json index 6b2e479c..44e2c5aa 100644 --- a/composer.json +++ b/composer.json @@ -16,13 +16,13 @@ }, "require-dev": { - "behat/mink-goutte-driver": "^1.1", - "guzzlehttp/guzzle": "^6.3", - "behat/mink-selenium2-driver": "^1.6", - "atoum/atoum": "^4.0", - "fabpot/goutte": "^3.2", - "phpunit/phpunit": "^9.5", - "atoum/stubs": "^2.6" + "behat/mink-goutte-driver": "^1.3 || ^2.0", + "guzzlehttp/guzzle": "^6.3 || ^7.0", + "behat/mink-selenium2-driver": "^1.7", + "atoum/atoum": "^4.4", + "fabpot/goutte": "^3.3 || ^4.0", + "phpunit/phpunit": "^9.6.29", + "atoum/stubs": "^2.7" }, "autoload": { From 6c27e495e8e26ce388a9ca00a387e52495088cba Mon Sep 17 00:00:00 2001 From: Hubert Lenoir Date: Sat, 29 Nov 2025 15:45:29 +0100 Subject: [PATCH 2/2] fix: set test feature language (#39) --- .github/workflows/ci.yml | 2 +- src/Json/Json.php | 4 ++-- src/Xml/Dom.php | 4 ++-- tests/features/{ => en}/browser.feature | 1 + tests/features/{ => en}/debug.feature | 1 + tests/features/{ => en}/json.feature | 1 + tests/features/{ => en}/rest.feature | 3 ++- tests/features/{ => en}/system.feature | 1 + tests/features/{ => en}/table.feature | 1 + tests/features/{ => en}/xml.feature | 1 + tests/features/ja/browser.feature | 8 ++++---- 11 files changed, 17 insertions(+), 10 deletions(-) rename tests/features/{ => en}/browser.feature (99%) rename tests/features/{ => en}/debug.feature (96%) rename tests/features/{ => en}/json.feature (99%) rename tests/features/{ => en}/rest.feature (98%) rename tests/features/{ => en}/system.feature (98%) rename tests/features/{ => en}/table.feature (99%) rename tests/features/{ => en}/xml.feature (99%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 50411502..0824b0dc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -173,4 +173,4 @@ jobs: while ! nc -z localhost 8080 content, $flags); } - public function __toString() + public function __toString(): string { return $this->encode(false); } diff --git a/src/Xml/Dom.php b/src/Xml/Dom.php index 2b3488e7..f6de33d8 100644 --- a/src/Xml/Dom.php +++ b/src/Xml/Dom.php @@ -2,7 +2,7 @@ namespace Behatch\Xml; -class Dom +class Dom implements \Stringable { private $dom; @@ -16,7 +16,7 @@ public function __construct($content) $this->throwError(); } - public function __toString() + public function __toString(): string { $this->dom->formatOutput = true; diff --git a/tests/features/browser.feature b/tests/features/en/browser.feature similarity index 99% rename from tests/features/browser.feature rename to tests/features/en/browser.feature index b95375d3..46b932f7 100644 --- a/tests/features/browser.feature +++ b/tests/features/en/browser.feature @@ -1,3 +1,4 @@ +# language: en Feature: Browser Feature # If this scenario fails diff --git a/tests/features/debug.feature b/tests/features/en/debug.feature similarity index 96% rename from tests/features/debug.feature rename to tests/features/en/debug.feature index 81990716..ed75d43a 100644 --- a/tests/features/debug.feature +++ b/tests/features/en/debug.feature @@ -1,3 +1,4 @@ +# language: en Feature: Browser Feature @user diff --git a/tests/features/json.feature b/tests/features/en/json.feature similarity index 99% rename from tests/features/json.feature rename to tests/features/en/json.feature index df6685c3..e2874b81 100644 --- a/tests/features/json.feature +++ b/tests/features/en/json.feature @@ -1,3 +1,4 @@ +# language: en @json Feature: Testing JSONContext diff --git a/tests/features/rest.feature b/tests/features/en/rest.feature similarity index 98% rename from tests/features/rest.feature rename to tests/features/en/rest.feature index 0b0a93c2..a08054ae 100644 --- a/tests/features/rest.feature +++ b/tests/features/en/rest.feature @@ -1,3 +1,4 @@ +# language: en @rest Feature: Testing RESTContext @@ -100,7 +101,7 @@ Feature: Testing RESTContext Scenario: Accept header should not be set by dfault When I send a GET request to "/rest/index.php" - Then I should not see "HTTP_ACCEPT" + Then I should not see "HTTP_ACCEPT :" @>php5.5 Scenario: Set content headers in POST request diff --git a/tests/features/system.feature b/tests/features/en/system.feature similarity index 98% rename from tests/features/system.feature rename to tests/features/en/system.feature index f516360a..88214d1d 100644 --- a/tests/features/system.feature +++ b/tests/features/en/system.feature @@ -1,3 +1,4 @@ +# language: en Feature: System feature Scenario: Testing execution diff --git a/tests/features/table.feature b/tests/features/en/table.feature similarity index 99% rename from tests/features/table.feature rename to tests/features/en/table.feature index 6584624e..a0eaf4d0 100644 --- a/tests/features/table.feature +++ b/tests/features/en/table.feature @@ -1,3 +1,4 @@ +# language: en Feature: Browser Feature Scenario: Testing access to /table/index.html diff --git a/tests/features/xml.feature b/tests/features/en/xml.feature similarity index 99% rename from tests/features/xml.feature rename to tests/features/en/xml.feature index 24645c2d..d8e02d2b 100644 --- a/tests/features/xml.feature +++ b/tests/features/en/xml.feature @@ -1,3 +1,4 @@ +# language: en @xml Feature: Testing XmlContext diff --git a/tests/features/ja/browser.feature b/tests/features/ja/browser.feature index 4dad9445..bedde7b1 100644 --- a/tests/features/ja/browser.feature +++ b/tests/features/ja/browser.feature @@ -9,7 +9,7 @@ @javascript シナリオ: Testing simple web access 前提 "/index.html" を表示している - ならば 画面に "Congratulations, you've correctly set up your apache environment." と表示されていること + ならば 画面に "Congratulations, you've correctly set up your apache environment." と表示されていること @statusCode シナリオ: Basic authentication @@ -65,9 +65,9 @@ ならば 私が"timeout"を見るまで3秒間待つ かつ 私が1秒間待つ かつ 私が"#iframe"要素を見るまで待つ - かつ 私が "#iframe" 要素を見るまで 5 秒間待つ - かつ 私が "#iframe" 要素を見るまで 5 秒待つ - かつ "#iframe" 要素を見るまで 5 秒待つ + かつ 私が "#iframe" 要素を見るまで 5 秒間待つ + かつ 私が "#iframe" 要素を見るまで 5 秒待つ + かつ "#iframe" 要素を見るまで 5 秒待つ @javascript シナリオ: Check element visibility