diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5783b64..0395a56 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,10 +34,11 @@ jobs: run: php -d pcov.enabled=1 vendor/bin/phpunit --coverage-clover=clover.xml --colors=always - name: Upload the coverage report - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v4 with: file: ./clover.xml fail_ci_if_error: true + token: b9688d71-d4b7-41e5-8b00-25406027a507 coding-style: name: Coding Style diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f43e3c..c86baf5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [Unreleased] * Fix unterminated entity reference error. [#101] + * Compatibility with Symfony 7. [#104] ## [1.2.0] (2023-05-30) @@ -165,6 +166,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm [0.2.0]: https://github.com/contao/image/compare/0.1.0...0.2.0 [0.1.0]: https://github.com/contao/image/commits/0.1.0 +[#104]: https://github.com/contao/image/issues/104 [#101]: https://github.com/contao/image/issues/101 [#98]: https://github.com/contao/image/issues/98 [#97]: https://github.com/contao/image/issues/97 diff --git a/composer.json b/composer.json index 6cd3efa..43ac83a 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "ext-zlib": "*", "imagine/imagine": "^1.3", "symfony/deprecation-contracts": "^2.1 || ^3.0", - "symfony/filesystem": "^5.4 || ^6.0", + "symfony/filesystem": "^5.4 || ^6.0 || ^7.0", "symfony/polyfill-php73": "^1.27", "symfony/polyfill-php80": "^1.27" }, @@ -30,7 +30,7 @@ "contao/imagine-svg": "^1.0", "contao/test-case": "^4.5", "phpunit/phpunit": "^8.5 || ^9.5", - "symfony/phpunit-bridge": "^5.4", + "symfony/phpunit-bridge": "^5.4 || ^6.0 || ^7.0", "symfony/polyfill-php81": "^1.27" }, "suggest": { diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 975a738..c2c9ab7 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -31,5 +31,3 @@ parameters: - message: '#ResizeCoordinates::isEqualTo\(\) expects .*, stdClass given#' path: %currentWorkingDirectory%/tests/ResizeCoordinatesTest.php - - - message: '#Access to an undefined property XMLReader::#' diff --git a/src/Metadata/XmpFormat.php b/src/Metadata/XmpFormat.php index 9d59f20..a373ac8 100644 --- a/src/Metadata/XmpFormat.php +++ b/src/Metadata/XmpFormat.php @@ -239,7 +239,7 @@ private function buildXmp(array $metadata): string foreach ($metadata as $namespace => $attributes) { foreach ($attributes as $attribute => $values) { - if (!$values = array_filter($values, 'strlen')) { + if (!$values = array_filter($values, static function ($value): bool { return '' !== (string) $value; })) { continue; }