Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jkuchar opened this issue May 10, 2019 · 4 comments

Comments

@jkuchar
Copy link

jkuchar commented May 10, 2019

  • 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).

@jkuchar
Copy link
Author

jkuchar commented May 10, 2019

If you agree with this proposal, @grifart will send PR for this.

@jkuchar jkuchar changed the title More useful error message when mismatching constructor and magic factory implementaion More self-explaining message constructor and factory parameters are mismatching May 10, 2019
@jkuchar jkuchar changed the title More self-explaining message constructor and factory parameters are mismatching More self-explaining message when constructor and factory parameters are mismatching May 10, 2019
@dg
Copy link
Member

dg commented Jan 17, 2023

👍

@jkuchar
Copy link
Author

jkuchar commented Jan 17, 2023

Approved by @dg. @dakur Could you please make look at this? :)

@dakur
Copy link
Contributor

dakur commented Jan 17, 2023

Here we go.. #284

@dg dg closed this as completed in 63b841b Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants