-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Conversation
* @link https://github.com/zendframework/zf2 for the canonical source repository | ||
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
* @package Zend_Form |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove @Package
public function getInputFilterSpecification() | ||
{ | ||
return array( | ||
'file_field' => array( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a flaw in the test here. You need to specify an input type in order for the merge order to work correctly; otherwise, a normal Input
will be created, and the FileInput
settings merged to it, which will result in the wrong context.
That said, even with 'type' => 'Zend\InputFilter\FileInput'
in your configuration, you still get an error -- just a different one (duplicated filters).
#4996 broke File filters management
- File inputs inside fieldsets were causing issues. - Issue was due to removal of a `$fieldset === $this` condition when determining whether or not to attach the input filter specification for a fieldset. - Tests had an issue as well: the input specification needed to indicate the input type in order to ensure the correct `FileInput` type is created on the initial seeding of the input filter.
@weierophinney so from release This is a compatibility break:
|
The bug fix for 2.2.3 was intentional, and documented. You were relying on This fix I introduce here covers a new issue introduced with #4996, which When we release 2.2.5, I will note the change, and also point out the On Wednesday, September 4, 2013, Filippo Tessarotto wrote:
Matthew Weier O'Phinney |
Ok, I understand. If
This is strange, isn't it? If it sounds strange for you too, either If this is ok for you, at least must be well documented on http://zf2.readthedocs.org/en/latest/modules/zend.form.quick-start.html#hinting-to-the-input-filter to avoid debugging headaches. |
@Slamdunk We have a default type, It does not make sense for the most common use case to require that people add the type. However, it's not unreasonable to require it for those cases where a specialized type is being used. As such, the exceptional case needs to be documented. Would you be willing to do a PR against the documentation for that? |
@weierophinney what about something like this #5079? I will also PR against the doc. |
[zendframework/zendframework#5050] FileInput filter note to explain type key
I've found PR #4996 broke how custom file input filter specification is handled; both
2.2.3
and2.2.4
releases are affected.I've tried hard to figure out why, but I'm sorry I was not able to 😕
Here the tests: note that both assertions fail, not only the first.