DataValues Interfaces is a small PHP library that defines a set of interfaces for parsers, formatters and validators.
It is part of the DataValues set of libraries.
On Packagist:

- PHP 5.5 or later
You can use Composer to download and install this package as well as its dependencies. Alternatively you can simply clone the git repository and take care of loading yourself.
To add this package as a local, per-project dependency to your project, simply add a
dependency on data-values/interfaces to your project's composer.json file.
Here is a minimal example of a composer.json file that just defines a dependency on
DataValues Interfaces 0.2:
{
"require": {
"data-values/interfaces": "0.2.*"
}
}
Get the DataValues Interfaces code, either via git, or some other means. Also get all dependencies. You can find a list of the dependencies in the "require" section of the composer.json file. Load all dependencies and the load the DataValues Interfaces library by including its entry point: Interfaces.php.
This library comes with a set up PHPUnit tests that cover all non-trivial code. You can run these tests using the PHPUnit configuration file found in the root directory. The tests can also be run via TravisCI, as a TravisCI configuration file is also provided in the root directory.
DataValues Interfaces has been written by Jeroen De Dauw, as Wikimedia Germany employee for the Wikidata project.
- Removed MediaWiki extension credits registration
- Fixed
ValueFormatterTestBasenot being installable via Composer.
- Updated minimal required PHP version from 5.3 to 5.5.9.
- Minor fixes to code documentation.
- Added PHPCS support.
- Fixed
ValueFormatterTestBasenot doing strict string comparisons.
- Fixed an issue when using this component with HHVM 1.11.0 (see #21).
- Dropped deprecated
ErrorObject, useErrorinstead - Dropped deprecated
ResultObject, useResultinstead - Dropped deprecated constant
DataValuesInterfaces_VERSION, useDATAVALUES_INTERFACES_VERSIONinstead - Dropped
ValueFormatterTestBase::getFormatterClass - Made
ValueFormatterTestBase::getInstanceabstract - The options in
ValueFormatterTestBase::getInstanceare now optional
- The options in the
ValueFormatterBaseconstructor are now optional - The MediaWiki extension registration now includes the license
- Added rawValue and expectedFormat arguments to
ValueParsers\ParseException
- Added
ValueFormatters\FormattingException
- Improved autoloading code
- Fixed link in MediaWiki credits
- Renamed entry point from DataValuesInterfaces.php to Interfaces.php
Initial release with these features:
ValueFormatters\ValueFormatterinterfaceValueParsers\ValueParserinterfaceValueValidators\ValueValidatorinterface



