From f11bce5f8d47a7ff995552c39c70eabb5e37c646 Mon Sep 17 00:00:00 2001 From: Matthias Harmuth Date: Tue, 29 Apr 2025 13:28:04 +0200 Subject: [PATCH 1/3] Support PHP 8.4 --- .github/workflows/test.yml | 5 ++++- CHANGELOG.md | 4 ++++ composer.json | 2 +- src/AssertTable.php | 6 +++--- src/TableParser/CSV/CSVStreamTableParser.php | 2 +- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6c654bc..5eb15d8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,6 +18,7 @@ jobs: - '8.1' - '8.2' - '8.3' + - '8.4' dependencies: - 'default' include: @@ -29,6 +30,8 @@ jobs: dependencies: 'lowest' - php_version: '8.3' dependencies: 'lowest' + - php_version: '8.4' + dependencies: 'lowest' steps: - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -44,7 +47,7 @@ jobs: run: | echo "::set-output name=dir::$(composer config cache-files-dir)" - - uses: actions/cache@v2 + - uses: actions/cache@v3 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-composer-${{matrix.php_version}}-${{ matrix.dependencies }}-${{ hashFiles('**/composer.json') }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 712612f..c62e163 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## Unreleased +## 1.3.2 / 2025-04-29 + +* Support PHP 8.4 + ## 1.3.1 / 2024-09-03 * Support PHP 8.3 diff --git a/composer.json b/composer.json index b77eb6b..44ae5c1 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ "require": { "behat/gherkin": ">=2.0.0 <5.0.0", "masterminds/html5": "^2.7.5", - "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "ext-dom": "*", "ext-SimpleXML": "*", "ext-libxml": "*" diff --git a/src/AssertTable.php b/src/AssertTable.php index 7bed25b..de78616 100644 --- a/src/AssertTable.php +++ b/src/AssertTable.php @@ -30,10 +30,10 @@ class AssertTable protected $formatter; /** - * @param \Ingenerator\BehatTableAssert\TableDiffer\TableDiffer|NULL $differ - * @param \Ingenerator\BehatTableAssert\TableDiffer\DiffFormatter|NULL $formatter + * @param \Ingenerator\BehatTableAssert\TableDiffer\TableDiffer|null $differ + * @param \Ingenerator\BehatTableAssert\TableDiffer\DiffFormatter|null $formatter */ - public function __construct(TableDiffer $differ = NULL, DiffFormatter $formatter = NULL) + public function __construct(?TableDiffer $differ = NULL, ?DiffFormatter $formatter = NULL) { $this->differ = $differ ?: new TableDiffer; $this->formatter = $formatter ?: new DiffFormatter; diff --git a/src/TableParser/CSV/CSVStreamTableParser.php b/src/TableParser/CSV/CSVStreamTableParser.php index 7c21100..f430b4d 100644 --- a/src/TableParser/CSV/CSVStreamTableParser.php +++ b/src/TableParser/CSV/CSVStreamTableParser.php @@ -63,7 +63,7 @@ protected function isValidStream($string) protected function readCSVRows($stream) { $rows = []; - while ($row = \fgetcsv($stream)) { + while ($row = \fgetcsv($stream, 0, ',', '"', '\\')) { if ($row === [NULL]) { $row = []; } From cdd9af762492331d2cd73a518e7b37716c9c18a8 Mon Sep 17 00:00:00 2001 From: acoulton Date: Wed, 30 Apr 2025 11:12:18 +0100 Subject: [PATCH 2/3] chore: Bump minimum phpunit version for PHP8.4 support --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 44ae5c1..f46a2ed 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "ext-libxml": "*" }, "require-dev": { - "phpunit/phpunit": "^9.5", + "phpunit/phpunit": "^9.6.22", "behat/mink": "^1.7" }, "suggest": { From c591b2da70b6ee93e024f9f8a4941cfb5b654449 Mon Sep 17 00:00:00 2001 From: Andrew Coulton Date: Tue, 6 May 2025 10:33:13 +0100 Subject: [PATCH 3/3] Bump changelog for new release date --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c62e163..947d5f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,9 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## Unreleased -## 1.3.2 / 2025-04-29 +## 1.3.2 / 2025-05-06 -* Support PHP 8.4 +* Support PHP 8.4 (thanks @mharmuth) ## 1.3.1 / 2024-09-03