Skip to content

DX: Improve error message on complex array-types #3281

@staabm

Description

@staabm

when describing complex array types, the error messages are pretty hard to read

see https://phpstan.org/r/53ed53b8-4203-42a8-ab19-f96de24e1ceb

Property clxArtikel::$belongs_to (array<string, array(?'class' => class-string, ?'foreign_key' => string, ?'foreign_key_name' => string, ?'joins' => string, ?'conditions' => string, ?'order' => string, ?'groupby' => string)>) does not accept default value of type array('Hersteller' => array('foreign_key' => 'herstelleradaid', 'foreign_key_name' => 'herstelleradaid'), 0 => 'Wka', 1 => 'Wgr').

its really hard to tell which of the expected types did match and which did not

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