Skip to content

Fix phpstan/phpstan#7280: array_reduce could infer the precise type of the $initial argument within the callable and in the return type #25878

Fix phpstan/phpstan#7280: array_reduce could infer the precise type of the $initial argument within the callable and in the return type

Fix phpstan/phpstan#7280: array_reduce could infer the precise type of the $initial argument within the callable and in the return type #25878

Triggered via pull request March 9, 2026 16:13
Status Failure
Total duration 11m 27s
Artifacts 13

phar.yml

on: pull_request
integration-tests  /  Check PHAR checksum
13s
integration-tests / Check PHAR checksum
Download base SHA PHAR
0s
Download base SHA PHAR
extension-tests  /  Check PHAR checksum
14s
extension-tests / Check PHAR checksum
other-tests  /  Check PHAR checksum
12s
other-tests / Check PHAR checksum
Commit PHAR
0s
Commit PHAR
Matrix: integration-tests / integration-run-phpstan
integration-tests  /  PMMP Tests
1m 16s
integration-tests / PMMP Tests
Matrix: integration-tests / integration-tests
Checksum PHAR
0s
Checksum PHAR
PHAR Prefix Diff
0s
PHAR Prefix Diff
Matrix: extension-tests / tests-extensions
Matrix: other-tests / Other Tests
integration-tests  /  Integration - Update baselines
0s
integration-tests / Integration - Update baselines
Fit to window
Zoom out
Zoom in

Annotations

63 errors and 3 warnings
integration-tests / Integration - shipmonk-rnd/dead-code-detector
Process completed with exit code 1.
integration-tests / Integration - shipmonk-rnd/dead-code-detector
Process completed with exit code 1.
integration-tests / Integration - shipmonk-rnd/dead-code-detector
Internal error: PHPStan\Analyser\NodeScopeResolver::processExprNode(): Argument #4 ($storage) must be of type PHPStan\Analyser\ExpressionResultStorage, Closure given, called in /home/runner/work/phpstan-src/phpstan-src/e2e/integration/repo/vendor/shipmonk/phpstan-rules/src/Rule/ForbidCheckedExceptionInCallableRule.php on line 239 while analysing file /home/runner/work/phpstan-src/phpstan-src/e2e/integration/repo/src/Compatibility/BackwardCompatibilityChecker.php Run PHPStan with -v option and post the stack trace to: https://github.com/phpstan/phpstan/issues/new?template=Bug_report.yaml
integration-tests / Integration - doctrine/dbal
Process completed with exit code 1.
integration-tests / Integration - doctrine/dbal: src/Portability/Converter.php#L284
Unreachable statement - code above always terminates.
integration-tests / Integration - doctrine/dbal: src/Portability/Converter.php#L280
Strict comparison using === between null and null will always evaluate to true.
integration-tests / Integration - doctrine/dbal: src/Driver/PDO/SQLSrv/Driver.php#L98
Only booleans are allowed in a ternary operator condition, mixed given.
integration-tests / Integration - Roave/BetterReflection
Process completed with exit code 1.
integration-tests / Integration - Roave/BetterReflection: src/Util/FileHelper.php#L46
Offset 2 might not exist on non-empty-list{0?: string, 1?: non-empty-string, 2?: non-empty-string}.
integration-tests / Integration - Roave/BetterReflection: src/Util/FileHelper.php#L46
Offset 1 might not exist on non-empty-list{0?: string, 1?: non-empty-string, 2?: non-empty-string}.
integration-tests / Integration - Roave/BetterReflection: src/SourceLocator/SourceStubber/AggregateSourceStubber.php#L50
Variable $stubData on left side of ?? always exists and is always null.
integration-tests / Integration - efabrica-team/phpstan-latte
Process completed with exit code 1.
integration-tests / Integration - efabrica-team/phpstan-latte: src/Resolver/ValueResolver/ValueResolver.php#L92
Parameter #2 $array of function implode expects array<string>, list<mixed> given.
integration-tests / Integration - efabrica-team/phpstan-latte: src/Compiler/Compiler/Latte3Compiler.php#L35
Call to function is_array() with list<Latte\Extension> will always evaluate to true.
integration-tests / Integration - larastan/larastan
Process completed with exit code 1.
integration-tests / Integration - larastan/larastan: src/Concerns/LoadsAuthModel.php (in context of class Larastan/Larastan/ReturnTypes/RequestUserExtension)#L37
Call to function in_array() with arguments mixed, array{} and true will always evaluate to false.
integration-tests / Integration - larastan/larastan: src/Concerns/LoadsAuthModel.php (in context of class Larastan/Larastan/ReturnTypes/GuardExtension)#L37
Call to function in_array() with arguments mixed, array{} and true will always evaluate to false.
integration-tests / Integration - larastan/larastan: src/Concerns/LoadsAuthModel.php (in context of class Larastan/Larastan/ReturnTypes/AuthManagerExtension)#L37
Call to function in_array() with arguments mixed, array{} and true will always evaluate to false.
integration-tests / Integration - larastan/larastan: src/Concerns/LoadsAuthModel.php (in context of class Larastan/Larastan/ReturnTypes/AuthExtension)#L37
Call to function in_array() with arguments mixed, array{} and true will always evaluate to false.
integration-tests / Integration - larastan/larastan: src/Concerns/LoadsAuthModel.php (in context of class Larastan/Larastan/Methods/Pipes/Auths)#L37
Call to function in_array() with arguments mixed, array{} and true will always evaluate to false.
integration-tests / Integration - doctrine/orm
Process completed with exit code 1.
integration-tests / Integration - doctrine/orm: src/Mapping/ClassMetadata.php#L1449
Parameter #1 $mappingArray of static method Doctrine\ORM\Mapping\AssociationMapping::fromMappingArray() expects array{fieldName: string, sourceEntity: class-string, targetEntity: class-string, cascade?: list<'all'|'detach'|'persist'|'refresh'|'remove'>, fetch?: 2|3|4|null, inherited?: class-string|null, declared?: class-string|null, cache?: array<mixed>|null, ...}, non-empty-array<mixed> given.
integration-tests / Integration - doctrine/orm: src/Mapping/ClassMetadata.php#L1448
Parameter #1 $mappingArray of static method Doctrine\ORM\Mapping\ManyToManyOwningSideMapping::fromMappingArrayAndNamingStrategy() expects array{fieldName: string, sourceEntity: class-string, targetEntity: class-string, cascade?: list<'all'|'detach'|'persist'|'refresh'|'remove'>, fetch?: 2|3|4|null, inherited?: class-string|null, declared?: class-string|null, cache?: array<mixed>|null, ...}, non-empty-array<mixed> given.
integration-tests / Integration - doctrine/orm: src/Mapping/ClassMetadata.php#L1440
Parameter #1 $mappingArray of static method Doctrine\ORM\Mapping\OneToManyAssociationMapping::fromMappingArrayAndName() expects array{fieldName: string, sourceEntity: class-string, targetEntity: class-string, cascade?: list<'all'|'detach'|'persist'|'refresh'|'remove'>, fetch?: 2|3|4|null, inherited?: class-string|null, declared?: class-string|null, cache?: array<mixed>|null, ...}, non-empty-array<mixed> given.
integration-tests / Integration - doctrine/orm: src/Mapping/ClassMetadata.php#L1432
Parameter #1 $mappingArray of static method Doctrine\ORM\Mapping\ToOneOwningSideMapping::fromMappingArrayAndName() expects array{fieldName: string, sourceEntity: class-string, targetEntity: class-string, cascade?: list<'all'|'detach'|'persist'|'refresh'|'remove'>, fetch?: 2|3|4|null, inherited?: class-string|null, declared?: class-string|null, cache?: array<mixed>|null, ...}, non-empty-array<mixed> given.
integration-tests / Integration - doctrine/orm: src/Mapping/ClassMetadata.php#L1428
Parameter #1 $mappingArray of static method Doctrine\ORM\Mapping\ToOneInverseSideMapping::fromMappingArrayAndName() expects array{fieldName: string, sourceEntity: class-string, targetEntity: class-string, cascade?: list<'all'|'detach'|'persist'|'refresh'|'remove'>, fetch?: 2|3|4|null, inherited?: class-string|null, declared?: class-string|null, cache?: array<mixed>|null, ...}, non-empty-array<mixed> given.
integration-tests / Integration - doctrine/orm: src/Mapping/ClassMetadata.php#L1422
Parameter #1 $mappingArray of static method Doctrine\ORM\Mapping\ToOneOwningSideMapping::fromMappingArrayAndName() expects array{fieldName: string, sourceEntity: class-string, targetEntity: class-string, cascade?: list<'all'|'detach'|'persist'|'refresh'|'remove'>, fetch?: 2|3|4|null, inherited?: class-string|null, declared?: class-string|null, cache?: array<mixed>|null, ...}, non-empty-array<mixed> given.
integration-tests / PMMP Tests: src/item/Item.php#L741
Cannot cast mixed to int.
integration-tests / PMMP Tests: src/item/Item.php#L740
Cannot cast mixed to int.
integration-tests / PMMP Tests: src/item/Item.php#L739
Cannot cast mixed to int.
integration-tests / PMMP Tests: src/command/defaults/WhitelistCommand.php#L92
Parameter #2 $array of function implode expects array<string>, list<mixed> given.
integration-tests / PMMP Tests: src/command/defaults/WhitelistCommand.php#L91
Parameter #1 $array of function sort expects an array of values castable to string, array<mixed> given.
integration-tests / PMMP Tests: src/command/defaults/TeleportCommand.php#L101
Casting to *NEVER* something that's already *NEVER*.
integration-tests / PMMP Tests: src/command/defaults/TeleportCommand.php#L100
Casting to *NEVER* something that's already *NEVER*.
integration-tests / PMMP Tests: src/Server.php#L1192
Cannot cast mixed to string.
integration-tests / PMMP Tests: src/Server.php#L758
Ignored error pattern #^Cannot cast mixed to string\.$# (cast.string) in path /home/runner/work/phpstan-src/phpstan-src/e2e/integration/repo/src/Server.php is expected to occur 1 time, but occurred 2 times.
integration-tests / PMMP Tests: build/generate-block-serializer-consts.php#L181
Parameter #1 $array of function sort expects an array of values castable to string, array<mixed> given.
integration-tests / Integration - Rector tests
Process completed with exit code 1.
integration-tests / Integration - rectorphp/rector-src
Process completed with exit code 1.
integration-tests / Integration - laravel/framework
Process completed with exit code 1.
integration-tests / Integration - laravel/framework: src/Illuminate/View/Compilers/ComponentTagCompiler.php#L345
No error with identifier variable.undefined is reported on line 345.
integration-tests / Integration - laravel/framework: src/Illuminate/View/Compilers/ComponentTagCompiler.php#L344
No error with identifier variable.undefined is reported on line 344.
integration-tests / Integration - laravel/framework: src/Illuminate/View/Compilers/ComponentTagCompiler.php#L343
No error with identifier variable.undefined is reported on line 343.
integration-tests / Integration - laravel/framework: src/Illuminate/Mail/Mailable.php#L268
No error with identifier callable.nonNativeMethod is reported on line 268.
integration-tests / Integration - laravel/framework: src/Illuminate/Http/Client/PendingRequest.php#L1081
Variable $shouldRetry on left side of ?? always exists and is always null.
integration-tests / Integration - laravel/framework: src/Illuminate/Foundation/Console/RouteListCommand.php#L406
Variable $action on left side of ?? always exists and is not nullable.
integration-tests / Integration - drupal/drupal
Process completed with exit code 1.
integration-tests / Integration - drupal/drupal: core/tests/Drupal/Tests/PerformanceTestTrait.php (in context of class Drupal/FunctionalJavascriptTests/PerformanceTestBase)#L166
Offset 'delete' on array{}|array{get: non-empty-array<*NEVER*, non-empty-list<*NEVER*>>} in isset() does not exist.
integration-tests / Integration - drupal/drupal: core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php#L1273
Variable $related_responses in empty() always exists and is always falsy.
integration-tests / Integration - drupal/drupal: core/modules/filter/src/Entity/FilterFormat.php#L321
Variable $restrictions in isset() always exists and is always null.
integration-tests / Integration - shopware/shopware: src/Core/Installer/Controller/FinishController.php#L72
Offset 'host' might not exist on non-empty-array{scheme?: string, host?: string, port?: int<0, 65535>, user?: string, pass?: string, path?: string, query?: string, fragment?: string}.
integration-tests / Integration - shopware/shopware: src/Core/Framework/DataAbstractionLayer/Search/Criteria.php#L499
Parameter #1 $ids of class Shopware\Core\Framework\DataAbstractionLayer\Search\Criteria constructor expects array<string>|null, array<array<string>|string> given.
integration-tests / Integration - shopware/shopware: src/Core/DevOps/Test/AnnotationTagTester.php#L151
Offset 4 might not exist on non-empty-list{0?: string, 1?: non-empty-string|null, 2?: string|null, 3?: non-empty-string|null, 4?: string|null}.
integration-tests / Integration - shopware/shopware: src/Core/DevOps/Test/AnnotationTagTester.php#L151
Offset 3 might not exist on non-empty-list{0?: string, 1?: non-empty-string|null, 2?: string|null, 3?: non-empty-string|null, 4?: string|null}.
integration-tests / Integration - shopware/shopware: src/Core/DevOps/Test/AnnotationTagTester.php#L150
Offset 2 might not exist on non-empty-list{0?: string, 1?: non-empty-string|null, 2?: string|null, 3?: non-empty-string|null, 4?: string|null}.
integration-tests / Integration - shopware/shopware: src/Core/DevOps/Test/AnnotationTagTester.php#L150
Offset 1 might not exist on non-empty-list{0?: string, 1?: non-empty-string|null, 2?: string|null, 3?: non-empty-string|null, 4?: string|null}.
integration-tests / Integration - shopware/shopware: src/Core/Checkout/Cart/LineItemFactoryRegistry.php#L99
Parameter #2 $data of method Shopware\Core\Checkout\Cart\LineItemFactoryHandler\LineItemFactoryInterface::update() expects array<string, mixed>, array<int|string, mixed> given.
integration-tests / Integration - shopware/shopware: src/Core/Checkout/Cart/LineItemFactoryRegistry.php#L54
Parameter #1 $data of method Shopware\Core\Checkout\Cart\LineItemFactoryHandler\LineItemFactoryInterface::create() expects array<string, mixed>, array<int|string, mixed> given.
other-tests / Other Tests (7.4, windows-latest, cd e2e/name-conflict composer install cp ../../phpstan vendor/p...
Environment variable 'INPUT_GITHUB_CONTEXT' exceeds the maximum supported length. Environment variable length: 34085 , Maximum supported length: 32766
other-tests / Other Tests (7.4, windows-latest, cd e2e/name-conflict composer install cp ../../phpstan vendor/p...
Environment variable 'INPUT_GITHUB_CONTEXT' exceeds the maximum supported length. Environment variable length: 34085 , Maximum supported length: 32766
other-tests / Other Tests (7.4, windows-latest, cd e2e/name-conflict composer install cp ../../phpstan vendor/p...
Environment variable 'INPUT_GITHUB_CONTEXT' exceeds the maximum supported length. Environment variable length: 34085 , Maximum supported length: 32766

Artifacts

Produced during runtime
Name Size Digest
baselines-better-reflection-baseline.neon
449 Bytes
sha256:772fa0f8ac4b15543cb1ecb2cb513aab8c40e1761f3335f99b5de41de0bd7b62
baselines-doctrine-dbal-baseline.neon
1.09 KB
sha256:412d4615018e76849cb134d9384b18f7ef438d8d663c2d1ba78b0018ac737098
baselines-doctrine-orm-baseline.neon
1.16 KB
sha256:4acd2a0b61445d57d3acf4fddfc4f415c8f3425b2ba5e05ccf647b6fbd324420
baselines-drupal-baseline.neon
1.29 KB
sha256:b405d2bdab754dce73d8fcbe6874747051587ad0ea8e1ef22b53477703eb8e10
baselines-efabrica-phpstan-latte-baseline.neon
706 Bytes
sha256:f0e29634a93baad12c8414d76e102dcc97680855d29379951eeedd30e712cca8
baselines-larastan-baseline.neon
526 Bytes
sha256:232c7cff0829a401b82e9c5fd556dd622716f7d8fae1e3e1c8a61c19da8ae704
baselines-laravel-baseline.neon
384 Bytes
sha256:d133613671d0e4473846a65a9ad8702c6f87fada95f8dd75728f4c5aab8f97f4
baselines-rector-baseline.neon
826 Bytes
sha256:d860f94a0cc8fa091e7a812242c35861a347ea7f209d9131f2f6bb44aa1beb34
baselines-shipmonk-dead-code-detector-baseline.neon
228 Bytes
sha256:d71021de91acf4960846e0a2e6991e363cb8b001dd666558cdee6435bfbab01e
baselines-shopware-baseline.neon
10.5 KB
sha256:d2598c5a7d4b6bcefb7dc18df054f6532c43298d81aed9803f21fcb8e3d9988b
phar-file
3.76 MB
sha256:476ac337d1ba5c544a34c07b3259e02309bb0af3f4f4eecddbb957ad74223f9d
phar-file-checksum
3.76 MB
sha256:a854cbd89ca38edef3c76ed69f92517cf9bd77f11c8598fd443368c06a529f6a
pocketmine-ng-baseline.neon
1.23 KB
sha256:6f9c6bebf645eb4d4cd180fb65b7ea942b36e5f8ee388773d0f2884929ee49d8