ZF2-417: Zend\Form\Annotation\Hydrator doesn't allow to set underscoreSeparatedKeys

Issue Type: Bug Created: 2012-07-23T11:11:47.000+0000 Last Updated: 2012-10-08T20:15:06.000+0000 Status: Closed Fix version(s): Reporter: David Reyes Samblas Martinez (dsamblas) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend\Form

  • ClassMethods
  • annotation
  • form
  • hydrator
  • underscoreSeparatedKeys

Related issues: Attachments:


the Hydrator ClassMethods has a property only accesible though __construct underscoreSeparatedKeys, but there is no way to define this value though Form notation, or change it later on in the controller though any setter due the HydratorInterface doesn't has it defined.

Suggestion1: Change the Hydrator notation from AbstractStringAnnotation to AbstractArrayAnnotation and be something like this: @Zend\Form\Annotation\Hydrator({"class":"Zend\Stdlib\Hydrator\ClassMethods", "underscoreSeparatedKeys":false}) The rest of the Hydrators can happily ignore such additional params, and in ClassMethods if not defined can use default just as is right now.

Actually I ugly patched putting default to false instead of true to make this work with my Anotation definitions.


Posted by Chris Martin (cgmartin) on 2012-09-18T04:27:25.000+0000

PR added:

Posted by Ralph Schindler (ralph) on 2012-10-08T20:15:06.000+0000

This issue has been closed on Jira and moved to GitHub for issue tracking. To continue following the resolution of this issues, please visit:

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.