### Bug report All of these conditions should be understood the same way /cc @staabm ### Code snippet that reproduces the problem https://phpstan.org/r/774080cc-2f73-49a5-a049-491d030ca831 ### Expected output Same dumped type in all cases ### Did PHPStan help you today? Did it make you happy in any way? _No response_
Activity
phpstan-bot commentedon Jul 6, 2024
@ondrejmirtes After the latest push in 1.12.x, PHPStan now reports different result with your code snippet:
Full report
Dumped type: array<string>Dumped type: array<string>Dumped type: array<string>Dumped type: array<string>Dumped type: array<string>phpstan-bot commentedon Jul 19, 2024
@ondrejmirtes After the latest push in 1.12.x, PHPStan now reports different result with your code snippet:
Full report
Dumped type: array{0?: string, 1?: numeric-string}Dumped type: array{string, numeric-string}Dumped type: array{0?: string, 1?: numeric-string}Dumped type: array{0?: string, 1?: numeric-string}Dumped type: array{0?: string, 1?: numeric-string}phpstan-bot commentedon Aug 5, 2024
@ondrejmirtes After the latest push in 1.12.x, PHPStan now reports different result with your code snippet:
Full report
Dumped type: array{0?: string, 1?: non-falsy-string&numeric-string}Dumped type: array{string, non-falsy-string&numeric-string}Dumped type: array{0?: string, 1?: non-falsy-string&numeric-string}Dumped type: array{0?: string, 1?: non-falsy-string&numeric-string}Dumped type: array{0?: string, 1?: non-falsy-string&numeric-string}dktapps commentedon Sep 3, 2024
Yep, ran into this problem in a bunch of places in PocketMine: https://github.com/pmmp/PocketMine-MP/actions/runs/10665106327/job/29557785290?pr=6441
staabm commentedon Sep 3, 2024
another example combining int-cast and smaller-then (copied from #11262)
https://phpstan.org/r/0d011355-4446-4bd8-9b8d-0c44907f9a07
phpstan-bot commentedon Sep 4, 2024
@staabm After the latest push in 1.12.x, PHPStan now reports different result with your code snippet:
Full report
Offset 'background_image' might not exist on array{0?: string, background_image?: non-empty-string, 1?: non-empty-string}.nicholasruunu commentedon Oct 15, 2024
Does this have to do with the issue I'm having?
https://phpstan.org/r/4f406a70-f5f5-42ab-84ab-19c6c8f6549a
ondrejmirtes commentedon Oct 16, 2024
@nicholasruunu Unrelated, please open a separate discussion.
ondrejmirtes commentedon Nov 8, 2024
Fixed phpstan/phpstan-src#3612
github-actions commentedon Dec 10, 2024
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.