data-values/data-values 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

data-values/data-values

Composer 安装命令:

composer require data-values/data-values

包简介

Defines the DataValue interface and some trivial implementations

README 文档

README

Small PHP library that provides interfaces for Value Objects. Several libraries build on top of this foundation.

GitHub Workflow Status codecov

On Packagist: Latest Stable Version Download count

Installation

To add this package as a local, per-project dependency to your project, simply add a dependency on data-values/data-values to your project's composer.json file. Here is a minimal example of a composer.json file that just defines a dependency on DataValues 3.x:

    {
        "require": {
            "data-values/data-values": "^3.1.0"
        }
    }

Running the tests

For tests only

composer test

For style checks only

composer cs

For a full CI run

composer ci

Authors

DataValues has been written primarily by Jeroen De Dauw, in part for the Wikidata project and Wikimedia Germany.

Contributions where also made by several other awesome people.

Release notes

3.1.1 (2026-06-04)

  • Added tests/ directory to git export-ignore

3.1.0 (2022-10-21)

  • Improved compatibility with PHP 8.1; in particular, the new __serialize/__unserialize methods are implemented now (in addition to the still supported Serializable interface). Care has been taken to keep the output of getHash() stable; if other classes include the PHP serialization of data values in their own hashes, they should instead use the new getSerializationForHash() method where it exists.

3.0.0 (2021-01-19)

  • Removed getCopy from the DataValue interface and all implementations
  • Removed getSortKey from the DataValue interface and all implementations
  • Removed the Comparable, Hashable and Immutable interfaces
  • Removed DATAVALUES_VERSION constant
  • Removed DataValueTest (create a copy if you need it, though better refactor away the bad design)
  • Raised minimum PHP version from 5.5.9 to 7.2

2.3.0 (2019-09-16)

  • composer.json and phpunit.xml.dist are now included in releases

2.2.1 (2019-09-05)

  • Fixed DataValueTest not being part of the release

2.2.0 (2019-09-05)

  • Deprecated DATAVALUES_VERSION constant

2.1.1 (2017-09-28)

  • Fixed DataValueTest not being installable via Composer

2.1.0 (2017-08-09)

  • Removed MediaWiki integration

2.0.0 (2017-08-02)

  • Dropped Copyable interface
  • Dropped deprecated constant DataValues_VERSION, use DATAVALUES_VERSION instead
  • Deprecated newFromArray in all DataValue implementations.
  • Updated minimal required PHP version from 5.3 to 5.5.9
  • Updated documentation throughout the code

1.1.1 (2017-11-02)

  • Add .gitattributes file

1.1.0 (2017-08-09)

  • Remove MediaWiki integration

1.0.0 (2014-09-26)

  • The CI now ensures compatibility with PHP 5.6 and HHVM
  • A lot of type hints where improved
  • Protected methods and fields where changed to private
  • The test bootstrap no longer executes composer update
  • The test bootstrap now sets PHP strict mode
  • The contract of the Hashable::getHash method was updated
  • The MediaWiki internationalization support has been migrated to the JSON based version

0.1.1 (2013-11-22)

  • Removed support for running the tests via the MediaWiki test runner.
  • The test bootstrapping file now automatically does a composer install.
  • Removed custom autoloader in favour of defining autoloading in composer.json.

0.1.0 (2013-11-16)

Initial release with these features:

  • DataValue interface
    • BooleanValue implementation
    • NumberValue implementation
    • StringValue implementation
    • UnDeserializableValue implementation
    • UnknownValue implementation
  • Common interface definitions: Comparable, Copyable, Hashable, Immutable

Links

data-values/data-values 适用场景与选型建议

data-values/data-values 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.08M 次下载、GitHub Stars 达 17, 最近一次更新时间为 2013 年 06 月 13 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「wikibase」 「wikidata」 「datavalues」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 data-values/data-values 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 data-values/data-values 我们能提供哪些服务?
定制开发 / 二次开发

基于 data-values/data-values 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 1.08M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 20
  • 点击次数: 25
  • 依赖项目数: 26
  • 推荐数: 0

GitHub 信息

  • Stars: 17
  • Watchers: 13
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2013-06-13