Skip to content

Inconsistent result between run #443

Open
@noemi-salaun

Description

@noemi-salaun

I can't reproduce it on demand, but it looks like sometime phpstan-dba can infer a query result type, and 5min later, it fails on the same query.

I have a phpstan error ignored in my phpstan.neon :

'#^Method .* should return array<int, array{nbTransactions: int, platform: string}> but returns array<int, array<string, mixed>>.$#'

After installing phpstan-dba and running it successfuly, nothing change for this error.

One day later, my CI fail telling me that this ignored error isn't triggered anymore. So I tried running phpstan locally and yes, phpstan know the proper type for this query. So I remove the ignored error from my phpstan.neon, commit everything, it works.

Then 5min later, my phpstan warn me about the exact same error I just remove from ignored because it wasn't necessary anymore...

I tried removing the phpstan and phpstan-dba entirely but it keeps throwing the same error and I cannot make it detect the correct return type. The generated cache for phpstan-dba seems to vary between calls :/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions