diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 167eeda27a..4237d3f41b 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -380,6 +380,9 @@ jobs: - script: | cd e2e/bug-11819 ../../bin/phpstan + - script: | + cd e2e/bug-14305 + ../../bin/phpstan - script: | cd e2e/composer-and-phpstan-version-config composer install --ignore-platform-reqs diff --git a/e2e/bug-14305/phpstan.neon b/e2e/bug-14305/phpstan.neon new file mode 100644 index 0000000000..5fbd64483a --- /dev/null +++ b/e2e/bug-14305/phpstan.neon @@ -0,0 +1,4 @@ +parameters: + level: 5 + paths: + - test.php diff --git a/e2e/bug-14305/test.php b/e2e/bug-14305/test.php new file mode 100644 index 0000000000..b7daf92cfe --- /dev/null +++ b/e2e/bug-14305/test.php @@ -0,0 +1,15 @@ + 0, + 'nupath' => 7, +]); + +$row = ['id' => 0]; + +foreach ([BUG14305_XDOC_GMETA_EMTY, BUG14305_XDOC_GMETA_NUPATH] as $meta) + $row[array_search($meta, BUG14305_XDOC_GMETAS)] = ''; diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 6c3ff7e153..78d6e328a5 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -966,7 +966,7 @@ parameters: - rawMessage: PHPDoc tag @var with type float|int is not subtype of native type int. identifier: varTag.nativeType - count: 2 + count: 3 path: src/Type/Constant/ConstantArrayTypeBuilder.php -