tag:github.com,2008:https://github.com/zendframework/zend-inputfilter/releasesRelease notes from zend-inputfilter2019-08-28T19:45:57Ztag:github.com,2008:Repository/35280807/release-2.10.12019-08-28T19:48:40Zzend-inputfilter 2.10.1<h2>Added</h2>
<ul>
<li>Nothing.</li>
</ul>
<h2>Changed</h2>
<ul>
<li>Nothing.</li>
</ul>
<h2>Deprecated</h2>
<ul>
<li>Nothing.</li>
</ul>
<h2>Removed</h2>
<ul>
<li>Nothing.</li>
</ul>
<h2>Fixed</h2>
<ul>
<li>
<p><a href="https://github.com/zendframework/zend-inputfilter/pull/185" data-hovercard-type="pull_request" data-hovercard-url="/zendframework/zend-inputfilter/pull/185/hovercard">#185</a> fixes validation response on invalid file upload request.</p>
</li>
<li>
<p><a href="https://github.com/zendframework/zend-inputfilter/pull/181" data-hovercard-type="pull_request" data-hovercard-url="/zendframework/zend-inputfilter/pull/181/hovercard">#181</a> fixes missing abstract service factory registration in <code>Module</code> as per the <a href="https://docs.zendframework.com/zend-inputfilter/specs/#setup" rel="nofollow">latest documentation</a>. In particular, it ensures that the <code>InputFilterAbstractFactory</code> is registered under the <code>input_filters</code> configuration.</p>
</li>
<li>
<p><a href="https://github.com/zendframework/zend-inputfilter/pull/180" data-hovercard-type="pull_request" data-hovercard-url="/zendframework/zend-inputfilter/pull/180/hovercard">#180</a> fixes attaching validators on creation of InputFilter - <code>priority</code> value is now used.</p>
</li>
</ul>michalbundyratag:github.com,2008:Repository/35280807/release-2.10.02019-01-30T16:59:36Zzend-inputfilter 2.10.0<h2>Added</h2>
<ul>
<li>
<p><a href="https://github.com/zendframework/zend-inputfilter/pull/176" data-hovercard-type="pull_request" data-hovercard-url="/zendframework/zend-inputfilter/pull/176/hovercard">#176</a> adds the interface <code>UnfilteredDataInterface</code>, with the following methods:</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="public function getUnfilteredData() : array|object;
public function setUnfilteredData(array|object $data) : $this;"><pre><span class="pl-k">public</span> <span class="pl-k">function</span> getUnfilteredData() : <span class="pl-smi">array</span>|<span class="pl-smi"><span class="pl-smi">object</span></span>;
<span class="pl-k">public</span> <span class="pl-k">function</span> setUnfilteredData(<span class="pl-smi">array</span>|<span class="pl-smi"><span class="pl-smi">object</span></span> <span class="pl-s1"><span class="pl-c1">$</span>data</span>) : <span class="pl-c1">$</span><span class="pl-smi"><span class="pl-smi">this</span></span>;</pre></div>
<p>By default, the <code>BaseInputFilter</code> now implements this interface.</p>
<p>The primary purpose of the interface is to allow the ability to access ALL<br>
original raw data, and not just the data the input filter knows about. This is<br>
particularly useful with collections.</p>
</li>
</ul>
<h2>Changed</h2>
<ul>
<li>Nothing.</li>
</ul>
<h2>Deprecated</h2>
<ul>
<li>Nothing.</li>
</ul>
<h2>Removed</h2>
<ul>
<li>Nothing.</li>
</ul>
<h2>Fixed</h2>
<ul>
<li>Nothing.</li>
</ul>weierophinneytag:github.com,2008:Repository/35280807/release-2.9.12019-01-07T17:54:10Zzend-inputfilter 2.9.1<h2>Added</h2>
<ul>
<li><a href="https://github.com/zendframework/zend-inputfilter/pull/174" data-hovercard-type="pull_request" data-hovercard-url="/zendframework/zend-inputfilter/pull/174/hovercard">#174</a> adds support for PHP 7.3.</li>
</ul>
<h2>Changed</h2>
<ul>
<li>Nothing.</li>
</ul>
<h2>Deprecated</h2>
<ul>
<li>Nothing.</li>
</ul>
<h2>Removed</h2>
<ul>
<li>Nothing.</li>
</ul>
<h2>Fixed</h2>
<ul>
<li><a href="https://github.com/zendframework/zend-inputfilter/pull/175" data-hovercard-type="pull_request" data-hovercard-url="/zendframework/zend-inputfilter/pull/175/hovercard">#175</a> fixes a regression introduced in 2.9.0 when overriding the default<br>
validator of a <code>FileInput</code>. 2.9.0 changed the default to use the<br>
fully-qualified class name of <code>Zend\Validator\File\Upload</code> as the service,<br>
instead of the previous 'fileuploadfile`; this release returns to the original<br>
behavior.</li>
</ul>weierophinneytag:github.com,2008:Repository/35280807/release-2.9.02018-12-17T21:30:39Zzend-inputfilter 2.9.0<h2>Added</h2>
<ul>
<li>
<p><a href="https://github.com/zendframework/zend-inputfilter/pull/172" data-hovercard-type="pull_request" data-hovercard-url="/zendframework/zend-inputfilter/pull/172/hovercard">#172</a> adds support for PSR-7 <code>UploadedFileInterface</code> to <code>Zend\InputFilter\FileInput</code>.<br>
It adds a new interface, <code>Zend\InputFilter\FileInput\FileInputDecoratorInterface</code>,<br>
which defines methods required for validating and filtering file uploads. It<br>
also provides two implementations of it, one for standard SAPI file uploads,<br>
and the other for PSR-7 uploads. The <code>FileInput</code> class does detection on the<br>
value being tested and decorates itself using the appropriate decorator, which<br>
then performs the work of validating and filtering the upload or uploads.</p>
</li>
<li>
<p><a href="https://github.com/zendframework/zend-inputfilter/pull/170" data-hovercard-type="pull_request" data-hovercard-url="/zendframework/zend-inputfilter/pull/170/hovercard">#170</a> adds the ability to set a "required" message on a <code>CollectionInputFilter</code>.<br>
By default, such instances will lazy-load a <code>NotEmpty</code> validator, and use its<br>
messages to report that the collection was empty if it is marked as required.<br>
If you wish to set a different message, you have two options:</p>
<ul>
<li>
<p>provide a custom <code>NotEmpty</code> validator via the new method<br>
<code>setNotEmptyValidator()</code>.</p>
</li>
<li>
<p>if using a factory, provide the key <code>required_message</code> as a sibling to<br>
<code>required</code>, containing the custom message. This will replace the typical<br>
<code>IS_EMPTY</code> message.</p>
</li>
</ul>
</li>
</ul>
<h2>Changed</h2>
<ul>
<li>Nothing.</li>
</ul>
<h2>Deprecated</h2>
<ul>
<li>Nothing.</li>
</ul>
<h2>Removed</h2>
<ul>
<li>Nothing.</li>
</ul>
<h2>Fixed</h2>
<ul>
<li>Nothing.</li>
</ul>weierophinneytag:github.com,2008:Repository/35280807/release-2.8.32018-12-13T22:53:56Zzend-inputfilter 2.8.3<h2>Added</h2>
<ul>
<li>Nothing.</li>
</ul>
<h2>Changed</h2>
<ul>
<li>Nothing.</li>
</ul>
<h2>Deprecated</h2>
<ul>
<li>Nothing.</li>
</ul>
<h2>Removed</h2>
<ul>
<li>Nothing.</li>
</ul>
<h2>Fixed</h2>
<ul>
<li><a href="https://github.com/zendframework/zend-inputfilter/pull/167" data-hovercard-type="pull_request" data-hovercard-url="/zendframework/zend-inputfilter/pull/167/hovercard">#167</a> fixes the combination of marking an <code>ArrayInput</code> required, and passing an<br>
empty array for validation; it now correctly detects these as invalid.</li>
</ul>weierophinneytag:github.com,2008:Repository/35280807/release-2.8.22018-05-14T17:39:33Zzend-inputfilter 2.8.2<h2>Added</h2>
<ul>
<li>Nothing.</li>
</ul>
<h2>Changed</h2>
<ul>
<li>Nothing.</li>
</ul>
<h2>Deprecated</h2>
<ul>
<li>Nothing.</li>
</ul>
<h2>Removed</h2>
<ul>
<li>Nothing.</li>
</ul>
<h2>Fixed</h2>
<ul>
<li>
<p><a href="https://github.com/zendframework/zend-inputfilter/pull/163" data-hovercard-type="pull_request" data-hovercard-url="/zendframework/zend-inputfilter/pull/163/hovercard">#163</a> adds code to <code>BaseInputFilter::populate()</code> to detect non-iterable,<br>
non-null values passed as a value for a composed input filter. Previously, these would trigger<br>
an exception; they now instead result in an empty array being used to populate the<br>
input filter, which will generally result in invalidation without causing an<br>
exception.</p>
</li>
<li>
<p><a href="https://github.com/zendframework/zend-inputfilter/pull/162" data-hovercard-type="pull_request" data-hovercard-url="/zendframework/zend-inputfilter/pull/162/hovercard">#162</a> fixes incorrect abstract service factory registration in <code>ConfigProvider</code>as per<br>
the <a href="https://docs.zendframework.com/zend-inputfilter/specs/#setup" rel="nofollow">latest documentation</a>. In particular, it ensures that the <code>InputFilterAbstractFactory</code><br>
is registered under the <code>input_filters</code> configuration instead of the<br>
<code>dependencies</code> configuration.</p>
</li>
</ul>weierophinneytag:github.com,2008:Repository/35280807/release-2.8.12018-01-22T19:43:30Zzend-inputfilter 2.8.1<h2>Added</h2>
<ul>
<li>Nothing.</li>
</ul>
<h2>Changed</h2>
<ul>
<li>Nothing.</li>
</ul>
<h2>Deprecated</h2>
<ul>
<li>Nothing.</li>
</ul>
<h2>Removed</h2>
<ul>
<li>Nothing.</li>
</ul>
<h2>Fixed</h2>
<ul>
<li>
<p><a href="https://github.com/zendframework/zend-inputfilter/pull/160" data-hovercard-type="pull_request" data-hovercard-url="/zendframework/zend-inputfilter/pull/160/hovercard">#160</a> adds zend-servicemanager as a direct requirement, rather than a suggestion. The package has not worked without it since <a href="https://github.com/zendframework/zend-inputfilter/pull/67" data-hovercard-type="pull_request" data-hovercard-url="/zendframework/zend-inputfilter/pull/67/hovercard">#67</a> was merged for the 2.6.1 release.</p>
</li>
<li>
<p><a href="https://github.com/zendframework/zend-inputfilter/pull/161" data-hovercard-type="pull_request" data-hovercard-url="/zendframework/zend-inputfilter/pull/161/hovercard">#161</a> fixes an issue whereby an input filter receiving a <code>null</code> value to <code>setData()</code> would raise an exception, instead of being treated as an empty data set.</p>
</li>
</ul>weierophinneytag:github.com,2008:Repository/35280807/release-2.8.02017-12-04T21:26:17Zzend-inputfilter 2.8.0<h2>Added</h2>
<ul>
<li>
<p><a href="https://github.com/zendframework/zend-inputfilter/pull/135" data-hovercard-type="pull_request" data-hovercard-url="/zendframework/zend-inputfilter/pull/135/hovercard">#135</a> adds <code>Zend\InputFilter\OptionalInputFilter</code>, which allows defining optional sets of data. This acts like a standard input filter, but is considered valid if no data, <code>null</code> data, or empty data sets are provided to it; if a non-empty data set is provided, it will run normal validations.</p>
</li>
<li>
<p><a href="https://github.com/zendframework/zend-inputfilter/pull/142" data-hovercard-type="pull_request" data-hovercard-url="/zendframework/zend-inputfilter/pull/142/hovercard">#142</a> adds support for PHP 7.2.</p>
</li>
</ul>
<h2>Changed</h2>
<ul>
<li>Nothing.</li>
</ul>
<h2>Deprecated</h2>
<ul>
<li>Nothing.</li>
</ul>
<h2>Removed</h2>
<ul>
<li><a href="https://github.com/zendframework/zend-inputfilter/pull/142" data-hovercard-type="pull_request" data-hovercard-url="/zendframework/zend-inputfilter/pull/142/hovercard">#142</a> removes support for HHVM.</li>
</ul>
<h2>Fixed</h2>
<ul>
<li>Nothing.</li>
</ul>weierophinneytag:github.com,2008:Repository/35280807/release-2.7.62017-12-04T20:53:04Zzend-inputfilter 2.7.6<h2>Added</h2>
<ul>
<li>Nothing.</li>
</ul>
<h2>Changed</h2>
<ul>
<li>Nothing.</li>
</ul>
<h2>Deprecated</h2>
<ul>
<li>Nothing.</li>
</ul>
<h2>Removed</h2>
<ul>
<li>Nothing.</li>
</ul>
<h2>Fixed</h2>
<ul>
<li><a href="https://github.com/zendframework/zend-inputfilter/pull/156" data-hovercard-type="pull_request" data-hovercard-url="/zendframework/zend-inputfilter/pull/156/hovercard">#156</a> fixes an issue introduced in 2.7.5 whereby the filter and validator chains composed in inputs pulled from the <code>InputFilterPluginManager</code> were not receiving the default filter and validator plugin manager instances. A solution was created that preserves the original behavior as well as the bugfix that created the regression.</li>
</ul>weierophinneytag:github.com,2008:Repository/35280807/release-2.7.52017-11-07T17:10:27Zzend-inputfilter 2.7.5<h2>Added</h2>
<ul>
<li>Nothing.</li>
</ul>
<h2>Deprecated</h2>
<ul>
<li>Nothing.</li>
</ul>
<h2>Removed</h2>
<ul>
<li>Nothing.</li>
</ul>
<h2>Fixed</h2>
<ul>
<li>
<p><a href="https://github.com/zendframework/zend-inputfilter/pull/151" data-hovercard-type="pull_request" data-hovercard-url="/zendframework/zend-inputfilter/pull/151/hovercard">#151</a> fixes an issue in <code>Factory::createInput()</code> introduced in <a href="https://github.com/zendframework/zend-inputfilter/pull/2" data-hovercard-type="pull_request" data-hovercard-url="/zendframework/zend-inputfilter/pull/2/hovercard">#2</a> whereby an input pulled from the input filter manager would be injected with the default filter and validator chains, overwriting any chains that were set during instantiation and/or <code>init()</code>. They are now never overwritten.</p>
</li>
<li>
<p><a href="https://github.com/zendframework/zend-inputfilter/pull/149" data-hovercard-type="pull_request" data-hovercard-url="/zendframework/zend-inputfilter/pull/149/hovercard">#149</a> fixes an issue with how error messages for collection input field items were reported; previously, as soon as one item in the collection failed, the same validation message was propagated to all other items. This is now resolved.</p>
</li>
<li>
<p><a href="https://github.com/zendframework/zend-inputfilter/pull/131" data-hovercard-type="pull_request" data-hovercard-url="/zendframework/zend-inputfilter/pull/131/hovercard">#131</a> fixes a regression introduced in version 2.2.6 within <code>BaseInputFilter::setValidatorGroup()</code> whereby it began emitting exceptions if a given input was not an input filter. This raises issues when mixing input filters and inputs in the same validator group specification, as you will generally provide the input names as keys instead of values. The patch provide ensures both styles work going forwards.</p>
</li>
</ul>weierophinney