Skip to content

Form::getValues(bool) broken #176

@hubipe

Description

@hubipe

Hello,
we're using older version of Nette, where method Container::getValues accepted only bool. The (pseudocode) signature of the method was:

/**
 * @return $asArray is true ? array<string, mixed> : ArrayHash
 */
Container::getValues(bool $asArray = false)

With the latest version, PHPStan thinks, that all the calls of Form::getValues(true) returns ArrayHash, but in reality, the array is returned:

Image

I think it is a bug introduced in this PR #175.

Either support for old version of Nette should be capped in composer.json or the code should align by the version of nette/forms installed.

Thanks for an awesome extension though! I'm always keen on working with PHPstan.

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