Skip to content

Closure::bind() and array type hinting inside closure #4906

@mente

Description

@mente

Bug report

With latest upgrade to 0.12.84 (by probably fixing #4808) PHPStan loses the typing of an array coming from an upper class.

Code snippet that reproduces the problem

https://phpstan.org/r/d4e5e3e8-57f6-4f1b-88e6-cfcd73e8c8ef

Expected output

No errors reports.

PS Simple type hinting of $connectionParameters inside Closure:bind would have helped, but fixing type erasure will be a proper solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions