Skip to content

Fix incorrect type inference for @phpstan-assert-if-true on $this with union types #21171

Fix incorrect type inference for @phpstan-assert-if-true on $this with union types

Fix incorrect type inference for @phpstan-assert-if-true on $this with union types #21171

Triggered via pull request August 19, 2025 12:40
Status Failure
Total duration 6m 47s
Artifacts 6

phar.yml

on: pull_request
Download base SHA PHAR
0s
Download base SHA PHAR
integration-tests  /  Check PHAR checksum
6s
integration-tests / Check PHAR checksum
extension-tests  /  Check PHAR checksum
5s
extension-tests / Check PHAR checksum
other-tests  /  Check PHAR checksum
6s
other-tests / Check PHAR checksum
Commit PHAR
0s
Commit PHAR
Checksum PHAR
Checksum PHAR
PHAR Prefix Diff
0s
PHAR Prefix Diff
Matrix: integration-tests / integration-run-phpstan
Matrix: integration-tests / integration-tests
Matrix: extension-tests / Extension Tests
Matrix: other-tests / Other Tests
integration-tests  /  Integration - Update baselines
0s
integration-tests / Integration - Update baselines
Fit to window
Zoom out
Zoom in

Annotations

28 errors and 1 notice
integration-tests / Integration - Rector tests
Process completed with exit code 1.
integration-tests / Integration - Rector tests
Cannot apply patch 0 (https://raw.githubusercontent.com/rectorphp/vendor-patches/main/patches/symfony-console-helper-helper-php.patch)!
integration-tests / Integration - rectorphp/rector-src
Process completed with exit code 1.
integration-tests / Integration - rectorphp/rector-src
Process completed with exit code 1.
integration-tests / Integration - rectorphp/rector-src
Cannot apply patch 0 (https://raw.githubusercontent.com/rectorphp/vendor-patches/main/patches/symfony-console-helper-helper-php.patch)!
extension-tests / Extension Tests (8.5, phpstan-deprecation-rules)
Process completed with exit code 2.
extension-tests / Extension Tests (8.5, phpstan-dibi)
Process completed with exit code 2.
integration-tests / Integration - bladestan/bladestan
Process completed with exit code 1.
integration-tests / Integration - bladestan/bladestan: src/TemplateCompiler/PHPStan/FileAnalyserProvider.php#L37
Method Bladestan\TemplateCompiler\PHPStan\FileAnalyserProvider::provide() throws checked exception PHPStan\DependencyInjection\MissingServiceException but it's missing from the PHPDoc @throws tag.
extension-tests / Extension Tests (8.5, phpstan-beberlei-assert)
Process completed with exit code 2.
extension-tests / Extension Tests (8.5, phpstan-webmozart-assert)
Process completed with exit code 2.
extension-tests / Extension Tests (8.5, phpstan-phpunit)
Process completed with exit code 2.
integration-tests / Integration - laravel/framework
Process completed with exit code 1.
integration-tests / Integration - laravel/framework: types/Support/Helpers.php#L66
Unreachable statement - code above always terminates.
integration-tests / Integration - laravel/framework: types/Support/Helpers.php#L47
Unreachable statement - code above always terminates.
extension-tests / Extension Tests (8.5, phpstan-symfony)
Process completed with exit code 2.
extension-tests / Extension Tests (8.5, phpstan-nette)
Process completed with exit code 2.
integration-tests / Integration - doctrine/orm
Process completed with exit code 1.
integration-tests / Integration - doctrine/orm: src/UnitOfWork.php#L2556
Call to method Doctrine\ORM\Mapping\AssociationMapping::isToMany() will always evaluate to true.
integration-tests / Integration - doctrine/orm: src/UnitOfWork.php#L2456
Call to method Doctrine\ORM\Mapping\AssociationMapping::isToOneOwningSide() will always evaluate to true.
integration-tests / Integration - doctrine/orm: src/Query/SqlWalker.php#L990
Call to method Doctrine\ORM\Mapping\AssociationMapping::isManyToMany() will always evaluate to true.
integration-tests / Integration - doctrine/orm: src/Query/SqlWalker.php#L954
Call to method Doctrine\ORM\Mapping\AssociationMapping::isToOneOwningSide() will always evaluate to true.
integration-tests / Integration - doctrine/orm: src/Persisters/Entity/BasicEntityPersister.php#L1910
Call to method Doctrine\ORM\Mapping\AssociationMapping::isToOneOwningSide() will always evaluate to true.
integration-tests / Integration - doctrine/orm: src/Persisters/Entity/BasicEntityPersister.php#L1713
Call to method Doctrine\ORM\Mapping\AssociationMapping::isToOneOwningSide() will always evaluate to true.
integration-tests / Integration - doctrine/orm: src/Persisters/Entity/BasicEntityPersister.php#L1297
Call to method Doctrine\ORM\Mapping\AssociationMapping::isToMany() will always evaluate to true.
integration-tests / Integration - doctrine/orm: src/Cache/DefaultEntityHydrator.php#L78
Call to method Doctrine\ORM\Mapping\AssociationMapping::isToOneOwningSide() will always evaluate to true.
integration-tests / Integration - Larastan tests PHP 8.3, ^11.15
Process completed with exit code 1.
extension-tests / Extension Tests (8.5, phpstan-strict-rules)
Process completed with exit code 2.
other-tests / Other Tests (7.4, windows-latest, cd e2e/name-conflict composer install cp ../../phpstan vendor/p...
The windows-latest label will migrate from Windows Server 2022 to Windows Server 2025 beginning September 2, 2025. For more information see https://github.com/actions/runner-images/issues/12677

Artifacts

Produced during runtime
Name Size Digest
baselines-bladestan-baseline.neon
403 Bytes
sha256:2d4b453e2270e0dcd8408d086f05f910550522090a6691cc118e65cbdd35a0c7
baselines-doctrine-orm-baseline.neon
1.66 KB
sha256:1a26d616979fc9f98f2b6427d2644da9c467146ed714b495597c375eeb903601
baselines-laravel-types-baseline.neon
317 Bytes
sha256:3b778a7b0dc150cfeb1b9ec0250229b60b5ba6994538c81d747fb9a6dfff65b6
baselines-rector-baseline.neon
506 Bytes
sha256:bb80e116deabbd322f964acb9c8d30566e3f567487aece12cb2d09b5044a84da
phar-file
3.64 MB
sha256:8190eb0c616eed9ab48aea69f8a12c22efe38b4e9eacf8c33c853d1bca090f75
phar-file-checksum
3.64 MB
sha256:ec252bdf9aab31d89548154f85e82cd7bd62ce7955e12029b9e0c0a6331583d7