PHPackages                             ericjank/aliyun-tablestore-sdk-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. ericjank/aliyun-tablestore-sdk-php

ActiveLibrary[Database &amp; ORM](/categories/database)

ericjank/aliyun-tablestore-sdk-php
==================================

Aliyun Tablestore SDK for PHP, 兼容hyperf框架协程模式

1137PHPCI failing

Since Jun 8Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ericjank/aliyun-tablestore-php-sdk)[ Packagist](https://packagist.org/packages/ericjank/aliyun-tablestore-sdk-php)[ RSS](/packages/ericjank-aliyun-tablestore-sdk-php/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Aliyun TableStore SDK for PHP - Version 5 (兼容hyperf协程、连接池版本)
============================================================

[](#aliyun-tablestore-sdk-for-php---version-5-兼容hyperf协程连接池版本)

说明
==

[](#说明)

(兼容hyperf协程、连接池版本)

Aliyun OTS SDK for PHP，用来通过PHP访问阿里云OTS服务。

适用于PHP 5.5 及以上版本，包括7.0、7.1、7.2。只支持64位的PHP系统。推荐使用PHP7，以得到最好的性能。

当前仅支持Linux，其他系统需要用户自己改造代码支持。

使用步骤
====

[](#使用步骤)

1. 请确认你的PHP版本为 5.5 或更高。你可以通过运行 php --version 获知你当前使用的PHP版本。
2. 设置PHP的时区，在 php.ini（要知道你正在使用的php.ini文件的位置，请执行命令 php --ini）中添加一行：

    date.timezone = Asia/Shanghai （请根据你当地的时区进行设置）
3. 设置PHP的内存使用限制为512M或者更高。同样是在 php.ini 中修改：

    memory\_limit = 512M
4. 执行安装命令

```
composer require ericjank/aliyun-tablestore-sdk-php:dev-master

```

5. 发布配置文件

```
   php bin/hyperf.php vendor:publish ericjank/aliyun-tablestore-sdk-php

```

这条命令会生成 config/autoload/tablestore.php 配置文件

6. 根据自己的实际情况配置 .env
7. 实例化客户端

```
$client = new \Aliyun\OTS\OTSClient() ;

```

编程文档
====

[](#编程文档)

我们提供了HTML格式的文档，请在浏览器中打开这些文档。

1. 文档主页：docs/index.html
2. SDK的调用入口 OTSClient：docs/classes/Aliyun.OTS.OTSClient.html

    这个文档中有丰富的代码样例，详细说明了每个API的使用方法。
3. 客户端配置：docs/classes/Aliyun.OTS.OTSClientConfig.html
4. 重试策略：docs/namespaces/Aliyun.OTS.Retry.html
5. 服务端返回的错误：docs/classes/Aliyun.OTS.OTSServerException.html
6. 客户端返回的错误：docs/classes/Aliyun.OTS.OTSClientException.html

### 运行Sample程序

[](#运行sample程序)

1. 修改 `examples/ExampleConfig.php`， 补充配置信息
2. 执行 `cd examples/`
3. 选择需要的样例运行，例如 `php PKAutoIncrment.php`, 表格列自增功能的示例。

### 运行单元测试

[](#运行单元测试)

1. 执行`composer install`下载依赖的库
2. 如果是php 7.2，还需要 `composer require --dev phpunit/phpunit "^5.7.11"`，升级下phpunit的版本，才能支持。
3. 设置环境变量

    ```
     export SDK_TEST_ACCESS_KEY_ID=access-key-id
     export SDK_TEST_ACCESS_KEY_SECRET=access-key-secret
     export SDK_TEST_END_POINT=endpoint
     export SDK_TEST_INSTANCE_NAME=instance-name

    ```
4. 执行 `php vendor/bin/phpunit`

贡献代码
----

[](#贡献代码)

- 我们非常欢迎大家为TableStore PHP SDK以及其他阿里云SDK贡献代码

帮助和支持 FAQ
=========

[](#帮助和支持-faq)

- [阿里云TableStore官方网站](http://www.aliyun.com/product/ots)
- [阿里云TableStore官方论坛](http://bbs.aliyun.com)
- [阿里云TableStore官方文档中心](https://help.aliyun.com/product/8315004_ots.html)
- [阿里云云栖社区](http://yq.aliyun.com)
- [阿里云工单系统](https://workorder.console.aliyun.com/#/ticket/createIndex)

### 扫码加入TableStore讨论群，和我们直接交流讨论

[](#扫码加入tablestore讨论群和我们直接交流讨论)

[![tablestoregroup](https://camo.githubusercontent.com/070a5ae9c41f5650a73217d83c8652c8b38c33f4bb65e71ebdeb374b92152865/68747470733a2f2f7461626c6573746f72652d646f632e6f73732d636e2d68616e677a686f752e616c6979756e63732e636f6d2f7461626c6573746f72655f64696e6764696e672e6a70673f782d6f73732d70726f636573733d696d6167652f726573697a652c6d5f6c6669742c685f343030)](https://camo.githubusercontent.com/070a5ae9c41f5650a73217d83c8652c8b38c33f4bb65e71ebdeb374b92152865/68747470733a2f2f7461626c6573746f72652d646f632e6f73732d636e2d68616e677a686f752e616c6979756e63732e636f6d2f7461626c6573746f72655f64696e6764696e672e6a70673f782d6f73732d70726f636573733d696d6167652f726573697a652c6d5f6c6669742c685f343030)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4476148?v=4)[老秦](/maintainers/ericjank)[@ericjank](https://github.com/ericjank)

---

Top Contributors

[![ericjank](https://avatars.githubusercontent.com/u/4476148?v=4)](https://github.com/ericjank "ericjank (11 commits)")

### Embed Badge

![Health badge](/badges/ericjank-aliyun-tablestore-sdk-php/health.svg)

```
[![Health](https://phpackages.com/badges/ericjank-aliyun-tablestore-sdk-php/health.svg)](https://phpackages.com/packages/ericjank-aliyun-tablestore-sdk-php)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.3k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M542](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M209](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
