laminas / laminas-form

Validate and display simple and complex forms, casting forms to business objects and vice versa
https://docs.laminas.dev/laminas-form/
BSD 3-Clause "New" or "Revised" License
80 stars 52 forks source link

Problem with different Renderer #249

Closed netzfische closed 7 months ago

netzfische commented 9 months ago

I'm using a Smarty-Renderer which implements the RendererInterface but does not extend the PhpRenderer.

So the following line fails for me: https://github.com/laminas/laminas-form/blob/2ec86da41462b8f9445b3d5f5ab4c5fc829d30f4/src/View/Helper/FormElement.php#L166

Would it be possible to change this to: assert($renderer instanceof RendererInterface);

Xerkus commented 9 months ago

Not really. Form view helpers depend on helper plugin manager which is part of php renderer and not renderer interface.

netzfische commented 9 months ago

Thanks for the quick info. I will adjust my Renderer in this case.

froschdesign commented 9 months ago

@netzfische

I'm using a Smarty-Renderer…

Is this a public project or is there a repository for this?

devlubinets commented 7 months ago

@netzfische is it closed?

netzfische commented 7 months ago

Yes, I solved it in the smarty module.

netzfische commented 7 months ago

Thanks