PackageTrack
Sign in Get early access

zendframework/zend-inputfilter

Abandoned; use laminas/laminas-inputfilter. Normalize and validate input sets from the web, APIs, the CLI, and more, including files

2.10.1 16M downloads/mo #4111 most downloaded on Packagist zendframework/zend-inputfilter

What this package is like to depend on

Last release 7 years ago

no release in 18 months

Release timing varies

gaps range from 3 weeks to 9 months

Some releases are documented

notes for 25 of 81 stable releases

Nothing withdrawn

no release was ever pulled

14 years old

81 releases · first in 2012

0 releases in the last 12 months

see the full history below

Release timeline

52 releases · Oct 2012 to Aug 2019
2013 2015 2017 2019 2021 2023 2025
Release Pre-release

Releases

latest 60 of 81
  1. 2.10.1 28 Aug 2019
    Release notes

    Added

    • Nothing.

    Changed

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #185 fixes validation response on invalid file upload request.

    • #181 fixes missing abstract service factory registration in Module as per the latest documentation. In particular, it ensures that the InputFilterAbstractFactory is registered under the input_filters configuration.

    • #180 fixes attaching validators on creation of InputFilter - priority value is now used.

    Open source →
    Release notes

    Added

    • Nothing.

    Changed

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #185 fixes validation response on invalid file upload request.

    • #181 fixes missing abstract service factory registration in Module as per the latest documentation. In particular, it ensures that the InputFilterAbstractFactory is registered under the input_filters configuration.

    • #180 fixes attaching validators on creation of InputFilter - priority value is now used.

    Open source →
  2. 2.10.0 30 Jan 2019
    Release notes

    Added

    • #176 adds the interface UnfilteredDataInterface, with the following methods:

      public function getUnfilteredData() : array|object;
      public function setUnfilteredData(array|object $data) : $this;

      By default, the BaseInputFilter now implements this interface.

      The primary purpose of the interface is to allow the ability to access ALL
      original raw data, and not just the data the input filter knows about. This is
      particularly useful with collections.

    Changed

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • Nothing.
    Open source →
    Release notes

    Added

    • #176 adds the interface UnfilteredDataInterface, with the following methods:

      public function getUnfilteredData() : array|object;
      public function setUnfilteredData(array|object $data) : $this;
      

      By default, the BaseInputFilter now implements this interface.

      The primary purpose of the interface is to allow the ability to access ALL original raw data, and not just the data the input filter knows about. This is particularly useful with collections.

    Changed

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • Nothing.
    Open source →
  3. 2.9.1 07 Jan 2019
    Release notes

    Added

    • #174 adds support for PHP 7.3.

    Changed

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #175 fixes a regression introduced in 2.9.0 when overriding the default
      validator of a FileInput. 2.9.0 changed the default to use the
      fully-qualified class name of Zend\Validator\File\Upload as the service,
      instead of the previous 'fileuploadfile`; this release returns to the original
      behavior.
    Open source →
    Release notes

    Added

    • #174 adds support for PHP 7.3.

    Changed

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #175 fixes a regression introduced in 2.9.0 when overriding the default validator of a FileInput. 2.9.0 changed the default to use the fully-qualified class name of Zend\Validator\File\Upload as the service, instead of the previous 'fileuploadfile`; this release returns to the original behavior.
    Open source →
  4. 2.9.0 17 Dec 2018
    Release notes

    Added

    • #172 adds support for PSR-7 UploadedFileInterface to Zend\InputFilter\FileInput.
      It adds a new interface, Zend\InputFilter\FileInput\FileInputDecoratorInterface,
      which defines methods required for validating and filtering file uploads. It
      also provides two implementations of it, one for standard SAPI file uploads,
      and the other for PSR-7 uploads. The FileInput class does detection on the
      value being tested and decorates itself using the appropriate decorator, which
      then performs the work of validating and filtering the upload or uploads.

    • #170 adds the ability to set a "required" message on a CollectionInputFilter.
      By default, such instances will lazy-load a NotEmpty validator, and use its
      messages to report that the collection was empty if it is marked as required.
      If you wish to set a different message, you have two options:

      • provide a custom NotEmpty validator via the new method
        setNotEmptyValidator().

      • if using a factory, provide the key required_message as a sibling to
        required, containing the custom message. This will replace the typical
        IS_EMPTY message.

    Changed

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • Nothing.
    Open source →
    Release notes

    Added

    • #172 adds support for PSR-7 UploadedFileInterface to Zend\InputFilter\FileInput. It adds a new interface, Zend\InputFilter\FileInput\FileInputDecoratorInterface, which defines methods required for validating and filtering file uploads. It also provides two implementations of it, one for standard SAPI file uploads, and the other for PSR-7 uploads. The FileInput class does detection on the value being tested and decorates itself using the appropriate decorator, which then performs the work of validating and filtering the upload or uploads.

    • #170 adds the ability to set a "required" message on a CollectionInputFilter. By default, such instances will lazy-load a NotEmpty validator, and use its messages to report that the collection was empty if it is marked as required. If you wish to set a different message, you have two options:

      • provide a custom NotEmpty validator via the new method setNotEmptyValidator().

      • if using a factory, provide the key required_message as a sibling to required, containing the custom message. This will replace the typical IS_EMPTY message.

    Changed

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • Nothing.
    Open source →
  5. 2.8.3 13 Dec 2018
    Release notes

    Added

    • Nothing.

    Changed

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #167 fixes the combination of marking an ArrayInput required, and passing an
      empty array for validation; it now correctly detects these as invalid.
    Open source →
    Release notes

    Added

    • Nothing.

    Changed

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #167 fixes the combination of marking an ArrayInput required, and passing an empty array for validation; it now correctly detects these as invalid.
    Open source →
  6. 2.8.2 14 May 2018
    Release notes

    Added

    • Nothing.

    Changed

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #163 adds code to BaseInputFilter::populate() to detect non-iterable,
      non-null values passed as a value for a composed input filter. Previously, these would trigger
      an exception; they now instead result in an empty array being used to populate the
      input filter, which will generally result in invalidation without causing an
      exception.

    • #162 fixes incorrect abstract service factory registration in ConfigProvideras per
      the latest documentation. In particular, it ensures that the InputFilterAbstractFactory
      is registered under the input_filters configuration instead of the
      dependencies configuration.

    Open source →
    Release notes

    Added

    • Nothing.

    Changed

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #163 adds code to BaseInputFilter::populate() to detect non-iterable, non-null values passed as a value for a composed input filter. Previously, these would trigger an exception; they now instead result in an empty array being used to populate the input filter, which will generally result in invalidation without causing an exception.

    • #162 fixes incorrect abstract service factory registration in ConfigProvideras per the latest documentation. In particular, it ensures that the InputFilterAbstractFactory is registered under the input_filters configuration instead of the dependencies configuration.

    Open source →
  7. 2.8.1 22 Jan 2018
    Release notes

    Added

    • Nothing.

    Changed

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #160 adds zend-servicemanager as a direct requirement, rather than a suggestion. The package has not worked without it since #67 was merged for the 2.6.1 release.

    • #161 fixes an issue whereby an input filter receiving a null value to setData() would raise an exception, instead of being treated as an empty data set.

    Open source →
    Release notes

    Added

    • Nothing.

    Changed

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #160 adds zend-servicemanager as a direct requirement, rather than a suggestion. The package has not worked without it since #67 was merged for the 2.6.1 release.

    • #161 fixes an issue whereby an input filter receiving a null value to setData() would raise an exception, instead of being treated as an empty data set.

    Open source →
  8. 2.8.0 04 Dec 2017
    Release notes

    Added

    • #135 adds Zend\InputFilter\OptionalInputFilter, which allows defining optional sets of data. This acts like a standard input filter, but is considered valid if no data, null data, or empty data sets are provided to it; if a non-empty data set is provided, it will run normal validations.

    • #142 adds support for PHP 7.2.

    Changed

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • #142 removes support for HHVM.

    Fixed

    • Nothing.
    Open source →
    Release notes

    Added

    • #135 adds Zend\InputFilter\OptionalInputFilter, which allows defining optional sets of data. This acts like a standard input filter, but is considered valid if no data, null data, or empty data sets are provided to it; if a non-empty data set is provided, it will run normal validations.

    • #142 adds support for PHP 7.2.

    Changed

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • #142 removes support for HHVM.

    Fixed

    • Nothing.
    Open source →
  9. 2.7.6 04 Dec 2017
    Release notes

    Added

    • Nothing.

    Changed

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #156 fixes an issue introduced in 2.7.5 whereby the filter and validator chains composed in inputs pulled from the InputFilterPluginManager 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.
    Open source →
    Release notes

    Added

    • Nothing.

    Changed

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #156 fixes an issue introduced in 2.7.5 whereby the filter and validator chains composed in inputs pulled from the InputFilterPluginManager 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.
    Open source →
  10. 2.7.5 07 Nov 2017
    Release notes

    Added

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #151 fixes an issue in Factory::createInput() introduced in #2 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 init(). They are now never overwritten.

    • #149 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.

    • #131 fixes a regression introduced in version 2.2.6 within BaseInputFilter::setValidatorGroup() 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.

    Open source →
    Release notes

    Added

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #151 fixes an issue in Factory::createInput() introduced in #2 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 init(). They are now never overwritten.

    • #149 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.

    • #131 fixes a regression introduced in version 2.2.6 within BaseInputFilter::setValidatorGroup() 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.

    Open source →
  11. 2.7.4 18 May 2017
    Release notes

    Added

    • Nothing.

    Changes

    • #122 maps the Zend\InputFilter\InputFilterPluginManager service to Zend\InputFilter\InputFilterPluginManagerFactory, and adds an alias from InputFitlerPluginManager to the fully qualified class name. This change allows you to request the service using either the original short name, or the fully qualified class name.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #137 fixes how the InputFilterPluginManagerFactory factory initializes the plugin manager instance, ensuring it is injecting the relevant configuration from the config service and thus seeding it with configured input filter services. This means that the input_filters configuration will now be honored in non-zend-mvc contexts.
    Open source →
  12. 2.7.3 18 Aug 2016
    Release notes

    Added

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #115 fixes retrieval of unknown fields when using a CollectionInputFilter. Previously, it returned all fields in the collection, not just the unknown fields, which was a different behavior from all other input filters. Now it will return only the unknown fields for each collection.
    • #108 fixes the InputFilterPluginManager::populateFactory() method to restore behavior from prior to the 2.7 series; specifically, previously it would inject itself as the plugin manager to input filter factories when under zend-servicemanager v2; it now will do so again.
    • #116 fixes the behavior of CollectionInputFilter::setData(). Prior to this release, it would validate whether the data represented a collection (i.e., it was an array or traversable) and whether individual items in the collection were data sets (i.e., arrays or traversables) only during isValid() and/or getUnknown() calls, raising exceptions during runtime. These should have been considered invalid arguments when the data was provided; they now are. As such, setData() now raises Zend\InputFilter\Exception\InvalidArgumentException for invalid data, ensuring that isValid() and getUnknown() only ever operate on usable collections and collection sets.
    • #118 fixes aggregation of error messages when validating collections to ensure only the error messages specific to a given datum are presented.
    Open source →
  13. 2.7.2 11 Jun 2016
    Release notes

    Added

    • #105 adds and publishes the documentation to https://zendframework.github.io/zend-inputfilter

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #110 fixes an issue with InputFilterAbstractServiceFactory whereby it was not working when the provided container is not a plugin manager, but rather the application container.
    Open source →
  14. 2.7.1 18 Apr 2016
    Release notes

    Added

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #104 fixes the Module::init() method to properly receive a ModuleManager instance, and not expect a ModuleEvent.
    Open source →
  15. 2.7.0 07 Apr 2016
    Release notes

    Added

    • #3 updates the InputFilterAbstractServiceFactory to inject the created input filter factory with the InputFilterManager service, ensuring that the generated factory can pull named input filters and inputs from the container as needed.
    • #100 adds a number of classes, in order to better allow usage as a standalone component:
      • InputFilterPluginManagerFactory, ported from zend-mvc, allows creating and returning an InputFilterPluginManager.
      • ConfigProvider maps the InputFilterManager service to the above factory, and enables the InputFilterAbstractServiceFactory.
      • Module does the same as ConfigProvider, within a zend-mvc context, and also registers a specification with the zend-modulemanager ServiceListener to allow modules to configure the input filter plugin manager.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • Nothing.
    Open source →
  16. 2.6.1 07 Apr 2016
    Release notes

    Added

    • #68 adds support for using either named keys or a name element in input filter specs parsed by the InputFilterAbstractServiceFactory.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #67 and #73 fix localization of the NotEmpty validation error message (created for any required input for which a value was not provided).
    Open source →
  17. 2.6.0 18 Feb 2016
    Release notes

    Added

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #86, #95, and #96 update the component to be forwards-compatible with zend-servicemanager v3.
    • #72 ArrayInput value is properly reset after BaseInputFilter::setData()
    Open source →
  18. 2.5.5 03 Sep 2015
    Release notes

    Added

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #22 adds tests to verify two conditions around inputs with fallback values:

      • If the input was not in the data set, it should not be represented in either the list of valid or invalid inputs.
      • If the input was in the data set, but empty, it should be represented in the list of valid inputs.
    • #31 updates the InputFilterInterface::add() docblock to match existing, shipped implementations.

    • #25 updates the input filter to prevent validation of missing optional fields (a BC break since 2.3.9). This change likely requires changes to your inputs as follows:

      $input = new Input();
      $input->setAllowEmpty(true);         // Disable BC Break logic related to treat `null` values as valid empty value instead *not set*.
      $input->setContinueIfEmpty(true);    // Disable BC Break logic related to treat `null` values as valid empty value instead *not set*.
      $input->getValidatorChain()->attach(
          new Zend\Validator\NotEmpty(),
          true                             // break chain on failure
      
      );
      
      $inputSpecification = [
        'allow_empty'       => true,
        'continue_if_empty' => true,
        'validators' => [
          [
            'break_chain_on_failure' => true,
            'name'                   => 'Zend\\Validator\\NotEmpty',
          ],
        ],
      ];
      
    • Numerous fixes aimed at bringing the functionality back to the pre-2.4 code, and improving quality overall of the component via increased testing and test coverage.

    Open source →
  19. 2.5.4 11 Aug 2015
    Release notes

    Added

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #15 ensures that ArrayAccess data provided to an input filter using setData() can be validated, a scenario that broke with #7.
    Open source →
  20. 2.5.3 03 Aug 2015
    Release notes

    Added

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #10 fixes an issue with with the combination of required, allow_empty, and presence of a fallback value on an input introduced in 2.4.5. Prior to the fix, the fallback value was no longer considered when the value was required but no value was provided; it now is.
    Open source →
  21. 2.5.2 28 Jul 2015
    Release notes

    Added

    • #2 adds support in Zend\InputFilter\Factory for using the composed InputFilterManager to retrieve an input of a given type based on configuration; only if the type is not available in the factory will it attempt to directly instantiate it.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #7 fixes an issue with the combination of required and allow_empty, now properly invalidating a data set if the required input is missing entirely (previously, it would consider the data set valid, and auto-initialize the missing input to null).
    Open source →
  22. 2.5.1 03 Jun 2015

    Nothing published for this version

  23. 2.5.0 03 Jun 2015

    Nothing published for this version

  24. 2.4.13 09 Sep 2015

    Nothing published for this version

  25. 2.4.12 no date

    Nothing published for this version

  26. 2.4.11 no date

    Nothing published for this version

  27. 2.4.10 no date

    Nothing published for this version

  28. 2.4.9 no date

    Nothing published for this version

  29. 2.4.8 no date
    Release notes

    Added

    • Nothing.

    Deprecated

    • #26 Deprecate magic logic for auto attach a NonEmpty validator with breakChainOnFailure = true. Instead append NonEmpty validator when desired.

      $input = new Zend\InputFilter\Input();
      $input->setContinueIfEmpty(true);
      $input->setAllowEmpty(true);
      $input->getValidatorChain()->attach(new Zend\Validator\NotEmpty(), /* break chain on failure */ true);
      

    Removed

    • Nothing.

    Fixed

    • Nothing.
    Open source →
  30. 2.4.7 11 Aug 2015
    Release notes

    Added

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #15 ensures that ArrayAccess data provided to an input filter using setData() can be validated, a scenario that broke with #7.
    Open source →
  31. 2.4.6 03 Aug 2015
    Release notes

    Added

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #10 fixes an issue with with the combination of required, allow_empty, and presence of a fallback value on an input introduced in 2.4.5. Prior to the fix, the fallback value was no longer considered when the value was required but no value was provided; it now is.
    Open source →
  32. 2.4.5 28 Jul 2015
    Release notes

    Added

    • Nothing.

    Deprecated

    • Nothing.

    Removed

    • Nothing.

    Fixed

    • #7 fixes an issue with the combination of required and allow_empty, now properly invalidating a data set if the required input is missing entirely (previously, it would consider the data set valid, and auto-initialize the missing input to null).
    Open source →
  33. 2.4.4 07 May 2015

    Nothing published for this version

  34. 2.4.3 no date

    Nothing published for this version

  35. 2.4.2 no date

    Nothing published for this version

  36. 2.4.1 no date

    Nothing published for this version

  37. 2.4.0 23 Mar 2015

    Nothing published for this version

  38. 2.3.9 13 Jan 2015

    Nothing published for this version

  39. 2.3.8 no date

    Nothing published for this version

  40. 2.3.7 no date

    Nothing published for this version

  41. 2.3.6 no date

    Nothing published for this version

  42. 2.3.5 no date

    Nothing published for this version

  43. 2.3.4 no date

    Nothing published for this version

  44. 2.3.3 11 Aug 2014

    Nothing published for this version

  45. 2.3.2 no date

    Nothing published for this version

  46. 2.3.1 15 Apr 2014

    Nothing published for this version

  47. 2.3.0 12 Mar 2014

    Nothing published for this version

  48. 2.2.10 05 Mar 2014

    Nothing published for this version

  49. 2.2.9 no date

    Nothing published for this version

  50. 2.2.8 no date

    Nothing published for this version

  51. 2.2.7 no date

    Nothing published for this version

  52. 2.2.6 no date

    Nothing published for this version

  53. 2.2.5 31 Oct 2013

    Nothing published for this version

  54. 2.2.4 23 Aug 2013

    Nothing published for this version

  55. 2.2.3 21 Aug 2013

    Nothing published for this version

  56. 2.2.2 22 Jul 2013

    Nothing published for this version

  57. 2.2.1 12 Jun 2013

    Nothing published for this version

  58. 2.2.0 10 May 2013

    Nothing published for this version

  59. 2.1.6 17 Apr 2013

    Nothing published for this version

  60. 2.1.5 no date

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive