From e7b54251cd510b67b8cfa8b62354ae25e6f04a1f Mon Sep 17 00:00:00 2001 From: Thibaut Selingue <7049020+thislg@users.noreply.github.com> Date: Fri, 5 Dec 2025 16:28:52 +0100 Subject: [PATCH 1/4] chore(composer): allow Symfony 8 --- .github/workflows/test.yml | 2 +- composer.json | 10 +++++----- phpstan.neon.dist | 3 ++- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dd9f724..3f9b6df 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: - php_version: ["7.4", "8.0", "8.1", "8.2", "8.3"] + php_version: ["7.4", "8.0", "8.1", "8.2", "8.3", "8.4", "8.5"] runs-on: ubuntu-latest container: diff --git a/composer.json b/composer.json index 345d7e1..cbb708d 100644 --- a/composer.json +++ b/composer.json @@ -23,10 +23,10 @@ "monolog/monolog": "^2.0|^3.0", "neitanod/forceutf8": "^2.0.4", "psr/log": "^1.0|^2.0|^3.0", - "symfony/config": "^5.4|^6.0|^7.0", - "symfony/event-dispatcher": "^5.4|^6.0|^7.0", - "symfony/finder": "^5.4|^6.0|^7.0", - "symfony/string": "^5.4|^6.0|^7.0", + "symfony/config": "^5.4|^6.0|^7.0|^8.0", + "symfony/event-dispatcher": "^5.4|^6.0|^7.0|^8.0", + "symfony/finder": "^5.4|^6.0|^7.0|^8.0", + "symfony/string": "^5.4|^6.0|^7.0|^8.0", "symfony/translation-contracts": "^1|^2|^3" }, "autoload": { @@ -59,7 +59,7 @@ "phpstan/extension-installer": "^1.1", "phpstan/phpstan": "^1.4", "phpunit/phpunit": "^9.6", - "symfony/phpunit-bridge": "^5.4|^6.0|^7.0" + "symfony/phpunit-bridge": "^5.4|^6.0|^7.0|^8.0" }, "scripts": { "analyse": "./vendor/bin/phpstan analyse --no-progress", diff --git a/phpstan.neon.dist b/phpstan.neon.dist index cd509b7..0be35db 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -15,4 +15,5 @@ parameters: message: '#Call to an undefined method Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition::.+\(\)#' paths: - ImportConfiguration.php - tmpDir: .phpstan.cache + reportUnmatchedIgnoredErrors: false # required for different versions of Symfony + tmpDir: .phpstan.cache \ No newline at end of file From a1b44a2649c4728e14c2d789a26697dc79752551 Mon Sep 17 00:00:00 2001 From: Thibaut Selingue <7049020+thislg@users.noreply.github.com> Date: Fri, 5 Dec 2025 16:38:20 +0100 Subject: [PATCH 2/4] fix(deprecation): pass fgetcsv escape argument --- Subscriber/ValidateCSVHeadersSubscriber.php | 2 +- Tests/Load/CsvLoaderTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Subscriber/ValidateCSVHeadersSubscriber.php b/Subscriber/ValidateCSVHeadersSubscriber.php index b172b9b..d80d6d4 100644 --- a/Subscriber/ValidateCSVHeadersSubscriber.php +++ b/Subscriber/ValidateCSVHeadersSubscriber.php @@ -42,7 +42,7 @@ public function onValidateSource(ImportValidateEvent $event): void fseek($fh, 0); } - $headers = fgetcsv($fh, 0, $config['load']['format_options']['field_delimiter']); + $headers = fgetcsv($fh, 0, $config['load']['format_options']['field_delimiter'], '"', ''); fclose($fh); $expectedHeaders = array_keys($config['load']['fields']); diff --git a/Tests/Load/CsvLoaderTest.php b/Tests/Load/CsvLoaderTest.php index f810568..319cecd 100644 --- a/Tests/Load/CsvLoaderTest.php +++ b/Tests/Load/CsvLoaderTest.php @@ -290,7 +290,7 @@ private function createCsv(string $csvContent): array fseek($handle, 0); $data = []; - while ($row = fgetcsv($handle)) { + while ($row = fgetcsv($handle, null, ',', '"', '')) { $data[] = $row; } From 9c4ade16ff593d2e5a5986f5a60ba35b52cc92fa Mon Sep 17 00:00:00 2001 From: Thibaut Selingue <7049020+thislg@users.noreply.github.com> Date: Fri, 5 Dec 2025 16:43:50 +0100 Subject: [PATCH 3/4] chore(phpunit): do not fail because of deprecations --- phpunit.xml.dist | 3 +++ 1 file changed, 3 insertions(+) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index fd7b1bd..bf53402 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,5 +1,8 @@ + + + ./ From 48c43226af8820b81db04cc1f35446fce08412f4 Mon Sep 17 00:00:00 2001 From: Thibaut Selingue <7049020+thislg@users.noreply.github.com> Date: Fri, 5 Dec 2025 16:53:10 +0100 Subject: [PATCH 4/4] chore(editorconfig): add final newline --- .editorconfig | 15 +++++++++++++++ phpstan.neon.dist | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..89ded63 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,15 @@ +root = true + +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.{js,json,vue,css,less,scss}] +indent_size = 2 + +[Makefile] +indent_style = tab diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 0be35db..b2deb46 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -16,4 +16,4 @@ parameters: paths: - ImportConfiguration.php reportUnmatchedIgnoredErrors: false # required for different versions of Symfony - tmpDir: .phpstan.cache \ No newline at end of file + tmpDir: .phpstan.cache