|
2 | 2 |
|
3 | 3 | All notable changes to this project will be documented in this file, in reverse chronological order by release.
|
4 | 4 |
|
| 5 | +## 2.4.8 - TBD |
| 6 | + |
| 7 | +### Added |
| 8 | + |
| 9 | +- Nothing. |
| 10 | + |
| 11 | +### Deprecated |
| 12 | + |
| 13 | +- [#26](https://github.com/zendframework/zend-inputfilter/pull/26) Deprecate magic logic for auto attach a NonEmpty |
| 14 | + validator with breakChainOnFailure = true. Instead append NonEmpty validator when desired. |
| 15 | + |
| 16 | + ```php |
| 17 | + $input = new Zend\InputFilter\Input(); |
| 18 | + $input->setContinueIfEmpty(true); |
| 19 | + $input->setAllowEmpty(true); |
| 20 | + $input->getValidatorChain()->attach(new Zend\Validator\NotEmpty(), /* break chain on failure */ true); |
| 21 | + ``` |
| 22 | +### Removed |
| 23 | + |
| 24 | +- Nothing. |
| 25 | + |
| 26 | +### Fixed |
| 27 | + |
| 28 | +- [#22](https://github.com/zendframework/zend-inputfilter/pull/22) adds tests to |
| 29 | + verify two conditions around inputs with fallback values: |
| 30 | + - If the input was not in the data set, it should not be represented in either |
| 31 | + the list of valid *or* invalid inputs. |
| 32 | + - If the input *was* in the data set, but empty, it should be represented in |
| 33 | + the list of valid inputs. |
| 34 | +- [#31](https://github.com/zendframework/zend-inputfilter/pull/31) updates the |
| 35 | + `InputFilterInterface::add()` docblock to match existing, shipped implementations. |
| 36 | +- [#25](https://github.com/zendframework/zend-inputfilter/pull/25) Fix missing optional fields to be required. |
| 37 | + BC Break since 2.3.9. |
| 38 | + For completely fix this you need to setup your inputs as follow. |
| 39 | + |
| 40 | + ```php |
| 41 | + $input = new Input(); |
| 42 | + $input->setAllowEmpty(true); // Disable BC Break logic related to treat `null` values as valid empty value instead *not set*. |
| 43 | + $input->setContinueIfEmpty(true); // Disable BC Break logic related to treat `null` values as valid empty value instead *not set*. |
| 44 | + $input->getValidatorChain()->attach( |
| 45 | + new Zend\Validator\NotEmpty(), |
| 46 | + true // break chain on failure |
| 47 | + ); |
| 48 | + ``` |
| 49 | + |
| 50 | + ```php |
| 51 | + $inputSpecification = array( |
| 52 | + 'allow_empty' => true, |
| 53 | + 'continue_if_empty' => true, |
| 54 | + 'validators' => array( |
| 55 | + array( |
| 56 | + 'break_chain_on_failure' => true, |
| 57 | + 'name' => 'Zend\\Validator\\NotEmpty', |
| 58 | + ), |
| 59 | + ), |
| 60 | + ); |
| 61 | + ``` |
| 62 | +- [Numerous fixes](https://github.com/zendframework/zend-inputfilter/milestones/2.4.8) |
| 63 | + aimed at bringing the functionality back to the pre-2.4 code, and improving |
| 64 | + quality overall of the component via increased testing and test coverage. |
| 65 | + |
5 | 66 | ## 2.4.7 - 2015-08-11
|
6 | 67 |
|
7 | 68 | ### Added
|
|
0 commit comments