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..947d5f6 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-05-06 + +* Support PHP 8.4 (thanks @mharmuth) + ## 1.3.1 / 2024-09-03 * Support PHP 8.3 diff --git a/composer.json b/composer.json index b77eb6b..f46a2ed 100644 --- a/composer.json +++ b/composer.json @@ -14,13 +14,13 @@ "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": "*" }, "require-dev": { - "phpunit/phpunit": "^9.5", + "phpunit/phpunit": "^9.6.22", "behat/mink": "^1.7" }, "suggest": { 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 = []; }