data-values/serialization
Composer 安装命令:
composer require data-values/serialization
包简介
Serializers and deserializers for DataValue implementations
README 文档
README
Serializers and deserializers for DataValue implementations.
It is part of the DataValues set of libraries.
On Packagist:
Installation
The recommended way to use this library is via Composer.
Composer
To add this package as a local, per-project dependency to your project, simply add a
dependency on data-values/serialization to your project's composer.json file.
Here is a minimal example of a composer.json file that just defines a dependency on
version 1.x of this package:
{
"require": {
"data-values/serialization": "1.*"
}
}
Manual
Get the code of this package, 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. Then take care of autoloading the classes defined in the src directory.
Tests
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 Github Actions.
Authors
DataValues Serialization has been written by Jeroen De Dauw, as Wikimedia Germany employee for the Wikidata project.
Release notes
1.2.5 (2022-10-21)
- Added a message to a possible deserialization exception.
1.2.4 (2021-03-29)
- Made component installable together with DataValues 3.x
- Raised required PHP version to 7.2
1.2.3 (2018-12-01)
- Made component installable together with DataValues 2.x
1.2.2 (2017-10-25)
- Made component installable together with Serialization 4.x
1.2.1 (2017-06-26)
- Fixed
DataValueDeserializernot always turning internalInvalidArgumentExceptionintoDeserializationException, as documented. - Raised required PHP version from 5.3 to 5.5.9.
1.2.0 (2017-01-31)
- Improved error reporting in the
DataValueDeserializerconstructor. - Added a basic PHPCS rule set, can be run with
composer phpcs.
1.1.0 (2016-05-24)
- Added support for builder functions to
DataValueDeserializer
1.0.3 (2015-08-05)
- Removed duplicate catch clause
- Removed
composer updatefrom the PHPUnit bootstrap file
1.0.2 (2014-10-10)
- Made component installable together with DataValues 1.x
1.0.1 (2014-09-09)
- Handle IllegalValueException in DataValueDeserializer
1.0.0 (2014-03-05)
- Switched usage of the Serialization component from version ~2.1 to version ~3.0.
- Switched from PSR-0 based autoloading to PSR-4 based autoloading
- Made PHPUnit bootstrap file compatible with Windows
0.1.0 (2013-12-05)
Initial release with these features:
- DataValues\Serializers\DataValueSerializer - Adapter that fits the toArray method of DataValue objects to the Serializer interface. This allows users to move to using the Serializer interface and remove their exposure to how serialization of DataValues is implemented.
- DataValues\Deserializers\DataValueDeserializer - Adapter that fits the newFromArray method of DataValues objects to the Deserializer interface. This allows users to remove the knowledge they have of how deserialization is implemented and break their dependency on DataValueFactory.
Links
data-values/serialization 适用场景与选型建议
data-values/serialization 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 327.71k 次下载、GitHub Stars 达 3, 最近一次更新时间为 2013 年 11 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「serialization」 「wikidata」 「datavalues」 「serializers」 「deserializers」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 data-values/serialization 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 data-values/serialization 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 data-values/serialization 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Defines the DataValue interface and some trivial implementations
Defines interfaces for ValueParsers, ValueFormatters and ValueValidators
Contains common implementations of the interfaces defined by DataValuesInterfaces
Common ValueValidator implementations
Geographical value objects, parsers and formatters
Time value objects, parsers and formatters
统计信息
- 总下载量: 327.71k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 33
- 依赖项目数: 11
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2013-11-19