Skip to content

Incorrect return types for stubbed core functions depending on PHP version #9888

@kkmuffme

Description

@kkmuffme

https://psalm.dev/r/7106f13383

in PHP 8 vsprintf will never return false, but in PHP 7 it will.
As discussed in #9877 (comment) the stubs will never fall back to the callmap - this makes declaring different return/param types between PHP versions impossible in psalm.

I suggest to change it to fall back from the stubs to the callmap if the param/return type is not declared in the stubs (but is in the callmap)

Also somehow related to #9843 since atm no consistency checking happens in-between the different versions of the callmap and the stubs either

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions