Skip to content

No errors reported when setting explicit type of function argument as mixed with phpVersion set to 70400 #5206

@tspencer244

Description

@tspencer244

Bug report

Using mixed as explicit type with function argument on PHP 7.4 is not reported as an error.

Configuration file has phpVersion option set to 70400.

Code snippet that reproduces the problem

https://phpstan.org/r/d86d4cdd-b7ee-4f2b-a5cb-1a0d4ced3bb5

Expected output

Parameter $mixed of anonymous function has invalid typehint type mixed.

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

PHPStan has helped me today to add a lot more clarity and confidence to old PHP code that would otherwise be scary to make changes in 🙂

It always makes me feel happy to fix all of the errors that PHPStan reports, and to bring new files into our existing PHPStan coverage at the strictest level 🙂

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions