failling CI build

Open
#688 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
github-actions, php, postgresql

Research direction

The failure is in tests/Platform/QueryResultTypeWalkerFetchTypeMatrixTest.php, especially lines 4658, 4508, and 532; start by running the pgsql test case for t.col_bool_nullable from the linked CI run. Compare the fetched false value with the expected null, and finish when the result behavior is resolved and the relevant CI test passes.

Written by the indexing model from the issue text.

Description

while exploring mutation testing I am stumbling over a failling CI test:

https://github.com/phpstan/phpstan-doctrine/actions/runs/18255085404/job/51975257235?pr=686

There was 1 failure:

1) PHPStan\Platform\QueryResultTypeWalkerFetchTypeMatrixTest::testPgsql with data set "t.col_bool_nullable" (array(array('1', true, null, 0.125, null, '0.1', null, 9, null, '2147483648', null, 'foobar', null, 1, DateTime Object (...))), 'SELECT t.col_bool_nullable FROM %s t', PHPStan\Type\UnionType Object (...), PHPStan\Type\UnionType Object (...), PHPStan\Type\UnionType Object (...), PHPStan\Type\UnionType Object (...), PHPStan\Type\UnionType Object (...), null, null, null, null, null, 'none')
Mismatch between expected result and fetched result

Driver: pgsql
Config: default
Dataset: t.col_bool_nullable
DQL: SELECT t.col_bool_nullable FROM PHPStan\Platform\Entity\PlatformEntity t
SQL: SELECT t0_.col_bool_nullable AS col_bool_nullable_0 FROM test t0_
PHP: 8.1
Real first item: false
Expected first item: NULL

Failed asserting that false is identical to null.

/home/runner/work/phpstan-doctrine/phpstan-doctrine/tests/Platform/QueryResultTypeWalkerFetchTypeMatrixTest.php:4658
/home/runner/work/phpstan-doctrine/phpstan-doctrine/tests/Platform/QueryResultTypeWalkerFetchTypeMatrixTest.php:4508
/home/runner/work/phpstan-doctrine/phpstan-doctrine/tests/Platform/QueryResultTypeWalkerFetchTypeMatrixTest.php:532

@VincentLanglet is this something you could look into?

Dominant language
PHP
Stars
678
Forks
122
Avg merge
5d 18h
Merged PRs (30d)
3

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from phpstan/phpstan-doctrine

All issues in phpstan/phpstan-doctrine

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.