di icon indicating copy to clipboard operation
di copied to clipboard

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

Open jkuchar opened this issue 6 years ago • 1 comments

  • 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 avatar May 10 '19 08:05 jkuchar

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

jkuchar avatar May 10 '19 08:05 jkuchar

👍

dg avatar Jan 17 '23 01:01 dg

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

jkuchar avatar Jan 17 '23 07:01 jkuchar

Here we go.. #284

dakur avatar Jan 17 '23 16:01 dakur