Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Zend\Stdlib\Hydrator interfaces no longer accepted by Zend\Form #25

Closed
@adamlundrigan

Description

@adamlundrigan

I happened to do a "composer update" on one of my projects very soon after Zend\Form 2.6.0 was released, and because of my version constraint (~2.5) it was installed...and then my form broke with this error:

Argument 1 passed to Zend\Form\Fieldset::setHydrator() must implement interface Zend\Hydrator\HydratorInterface, instance of ******\UserQueryHydrator given

Since my custom hydrator implemented the Zend\Stdlib\Hydrator\HydratorInterface directly instead of inheriting from AbstractHydrator I could no longer use my custom hydrator in forms.

The fix was simple (replace references to "Stdlib\Hydrator" with "Hydrator") but it's still a break. IMO the better way to fix it would be to update the interfaces in Zend\Stdlib\Hydrator to extend the new ones from the Zend\Hydrator namespace. If that's an acceptable solution I can send a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions