Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Zend\Form\Form has to override getHydrator() method as setHydrator(..) is. #2661

eimanavicius opened this Issue · 3 comments

2 participants


Fieldset (set as base fieldset) has ClassMethodsHydrator but if call getHydrator on Form that hydrator is changed to default one.

I think overridden getHydrator() should look like:

public function getHydrator() {
        if ($this->baseFieldset !== null) {
            return $this->baseFieldset->getHydrator();
        return parent::getHydrator();

@Hamlis i think this cannot be done.

Simple reason: Fieldset and form can be "independent" so in the Form you can also have a own hydrator and own elements...(also Form extends it's partly a "fieldset")

If it's okay for you -> can this get closed?


I agree with you "Fieldset and form can be "independent"", but then:

$hydrator != $form->getHydrator()

setHydrator should not be overrided to set hydrator for baseFieldset


This issue can be closed. I did not tracked when the change was made, but now hydrator setters and getters works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.