Skip to content

More self-explaining message when constructor and factory parameters are mismatching #199

Closed
@jkuchar

Description

@jkuchar
  • Is your feature request related to a problem?
    I would like to propose more self-explanatory exception message for case when constructor and magic factory implementation does not match.
  • Explain your intentions.
    I found that it is not always clear that constructor and magic fatory are bind together using parameter names, not types. Which is logical from implementation perspective (no ambiguity), however counter-intuitive from user perspective.

originally implemented in #99

Proposal

Instead of saying just

image

I would say Cannot implement ..\Components\HeaderFactory::create(), because parameters ($breadcrumbs, $logout) of factory method are not matching constructor of ...\Components\Breadrumbs ($breadcrumbsComponent, $logoutComponent).

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