8000 Array object nested types are not properly identified · Issue #7976 · phpstan/phpstan · GitHub
[go: up one dir, main page]

Skip to content

Array object nested types are not properly identified #7976

@razvan-tache

Description

@razvan-tache

Bug report

Hi, I have an issue with with a build that was passing on 1.8.2. I get:

should return ArrayObject<int|string, array<string,  mixed>> but returns ArrayObject<int|string, array>. 

Did some default option changed? To me array<string, mixed> says more than just array.

My config:

level: 8
    paths:
        - src
    checkGenericClassInNonGenericObjectType: false
    reportUnmatchedIgnoredErrors: false
    phpVersion: 70400

Code snippet that reproduces the problem

https://phpstan.org/r/84c094da-91ef-47b2-9161-b897debc6789

Expected output

No errors

Did PHPStan help you today? Did it make you happy in any way?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0