From 13e5f02fbdd3d00ed12a375f2c09a3428a630a0b Mon Sep 17 00:00:00 2001 From: kenjis Date: Wed, 7 Aug 2024 09:52:06 +0900 Subject: [PATCH 1/2] test: fix incorrect condition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------ ----------------------------------------------------------------------- Line tests/Language/AbstractTranslationTestCase.php ------ ----------------------------------------------------------------------- 327 Strict comparison using === between array{list} and array{} will always evaluate to false. 💡 Because the type is coming from a PHPDoc, you can turn off this check by setting treatPhpDocTypesAsCertain: false in your phpstan.neon.dist. ------ ----------------------------------------------------------------------- --- tests/Language/AbstractTranslationTestCase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Language/AbstractTranslationTestCase.php b/tests/Language/AbstractTranslationTestCase.php index a400e855b..daf0cfbd0 100644 --- a/tests/Language/AbstractTranslationTestCase.php +++ b/tests/Language/AbstractTranslationTestCase.php @@ -324,7 +324,7 @@ final public function testAllLocalizationParametersAreNotTranslated(string $loca preg_match_all('/(\{[^\}]+\})/', $translation, $matches); array_shift($matches); - if ($matches === []) { + if ($matches === [[]]) { unset($matches); continue; From 1d9290f83555fe04f74126e19b23987574bc025b Mon Sep 17 00:00:00 2001 From: kenjis Date: Wed, 7 Aug 2024 12:56:52 +0900 Subject: [PATCH 2/2] chore: add AbstractTranslationTestCase.php to `paths` --- .github/workflows/phpunit-lang.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/phpunit-lang.yml b/.github/workflows/phpunit-lang.yml index 4ff8e9c90..0a89cbcd9 100644 --- a/.github/workflows/phpunit-lang.yml +++ b/.github/workflows/phpunit-lang.yml @@ -9,6 +9,7 @@ on: - '!src/Language/en/**.php' - 'phpunit*' - '.github/workflows/phpunit-lang.yml' + - 'tests/Language/AbstractTranslationTestCase.php' push: branches: - develop @@ -17,6 +18,7 @@ on: - '!src/Language/en/**.php' - 'phpunit*' - '.github/workflows/phpunit-lang.yml' + - 'tests/Language/AbstractTranslationTestCase.php' jobs: main: