Multiple services of type… pomenovanie zavislosti nefunguje
- japlavaren
- Člen | 404
ahoj,
mam 2 triedy, ktore vytvaraju formular:
komponenty kde kazda chce dostat svoj formular:
interface na tovarnicku komponent:
a vsetko zaregistrovane v neone:
ked to spustim dostanem ocakavanu chybu:
Multiple services of type App\Form\PersonFormFactory found:
personFormFactory, personRegistrationFormFactory
co je pochopitelne preco. tak som si do IPersonFormComponentFactory
pridal pomenovanu zavislost ako:
a teraz to zacina byt zaujimave. nette mi hlasi chybu:
Return value of class@anonymous::create() must be an instance of
App\Component\PersonForm\PersonFormComponent, instance of
App\Form\PersonFormFactory returned
a podivny kod DI kontajnera:
mam zly zapis, alebo je to bug? ako predam factory pomenovanu zavislost aby to fungovalo? skusal som este:
ale zase dostavam chybu Multiple services of type App\Form\PersonFormFactory found…
Dakujem za pomoc
- japlavaren
- Člen | 404
skusal som to ale mam problem ako to zapisat:
hadze chybu Class IPersonFormComponentFactory used in service ‚x‘ not found.