PHPackages                             uniondrug/service-sdk - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. uniondrug/service-sdk

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

uniondrug/service-sdk
=====================

ServiceSDK

4.0.2(3y ago)928.1k32MITPHP

Since Mar 28Pushed 2y ago3 watchersCompare

[ Source](https://github.com/uniondrug/service-sdk)[ Packagist](https://packagist.org/packages/uniondrug/service-sdk)[ RSS](/packages/uniondrug-service-sdk/feed)WikiDiscussions 3.x Synced 2w ago

READMEChangelog (10)DependenciesVersions (2611)Used By (2)

SDK V3
======

[](#sdk-v3)

### how to do

[](#how-to-do)

> 如何使用`V3`版本SDK

1. 修改`composer.json`文件, 选择`3.x`版本 ```
    {
        .
        .
        "require" : {
            .
            .
            "uniondrug/service-sdk" : "^3.0",
            .
            .
        },
        .
        .
        "scripts" : {
            "post-autoload-dump" : "Uniondrug\\ServiceSdk\\Bases\\Ide::builder"
        }
    }

    ```
2. 执行`composer update`更新依赖版
3. 修改`config/app.php`应用 ```
       return [
           'default' => [
               .
               .
               .
               'providers' => [
                   .
                   .
                   .
                   \Uniondrug\ServiceSdk\Provider::class
               ]
           ]
       ];

    ```
4. 设置`config/sdk.php`配置文件, 从`vendor/uniondrug/service-sdk/docs/sdk.php`中复制即可
5. 去除`ServiceTrait`中对于`$sdk`的`@property`定义(可选, 若有则去除).

### how to run

[](#how-to-run)

1. 标准调用 ```
    $response = $this->serviceSdk->module->user->login(["mobile" => "13966013721"]);
    if ($response->hasError()){
       echo $response->getError();
    } else {
       echo $response->toJson();
    }

    ```
2. 基础调用 - 常用的7种Restful方式 ```
    $this->serviceSdk->delete("http://wxapi.uniondrug.cn/v/user");
    $this->serviceSdk->get("http://wxapi.uniondrug.cn/v/user");

    ```
3. 兼容模式 - `待废弃````
    $response = $this->serviceSdk->user->login(["mobile" => "13966013721"]);
    if ($response->hasError()){
       echo $response->getError();
    } else {
       echo $response->toJson();
    }

    ```

###  Health Score

44

—

FairBetter than 91% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community31

Small or concentrated contributor base

Maturity83

Battle-tested with a long release history

 Bus Factor4

4 contributors hold 50%+ of commits

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.

###  Release Activity

Cadence

Every ~1 days

Total

2608

Last Release

991d ago

Major Versions

1.6.430 → 3.0.352019-11-15

1.6.432 → 3.0.462019-11-21

1.x-dev → 3.0.942019-12-06

2.x-dev → 3.0.1912020-02-11

3.502.309 → 4.0.12023-02-24

### Community

Maintainers

![](https://www.gravatar.com/avatar/865ceb7d8226574735eab8fc82de9cfbc4a708c291b3c816e75d53944348b686?d=identicon)[wsfuyibing](/maintainers/wsfuyibing)

![](https://www.gravatar.com/avatar/5cd6edde9012a99962f94a0cd5e92666ff0a5b995489281d52a896bfdc5dfde2?d=identicon)[wss0823](/maintainers/wss0823)

![](https://avatars.githubusercontent.com/u/20695662?v=4)[李阳999](/maintainers/DrCarpen)[@DrCarpen](https://github.com/DrCarpen)

![](https://avatars.githubusercontent.com/u/14797825?v=4)[tlytly1234567](/maintainers/tlytly1234567)[@tlytly1234567](https://github.com/tlytly1234567)

![](https://avatars.githubusercontent.com/u/30474497?v=4)[phphtr](/maintainers/phphtr)[@phphtr](https://github.com/phphtr)

---

Top Contributors

[![MarioZhao](https://avatars.githubusercontent.com/u/30398280?v=4)](https://github.com/MarioZhao "MarioZhao (360 commits)")[![william-wqq](https://avatars.githubusercontent.com/u/12166074?v=4)](https://github.com/william-wqq "william-wqq (258 commits)")[![plutolo](https://avatars.githubusercontent.com/u/9401569?v=4)](https://github.com/plutolo "plutolo (185 commits)")[![haven-chen](https://avatars.githubusercontent.com/u/18387667?v=4)](https://github.com/haven-chen "haven-chen (174 commits)")[![lvchaohui](https://avatars.githubusercontent.com/u/34764539?v=4)](https://github.com/lvchaohui "lvchaohui (119 commits)")[![DrCarpen](https://avatars.githubusercontent.com/u/20695662?v=4)](https://github.com/DrCarpen "DrCarpen (117 commits)")[![wss0823](https://avatars.githubusercontent.com/u/9457778?v=4)](https://github.com/wss0823 "wss0823 (103 commits)")[![zuoqiang320](https://avatars.githubusercontent.com/u/12770030?v=4)](https://github.com/zuoqiang320 "zuoqiang320 (93 commits)")[![fuyibing](https://avatars.githubusercontent.com/u/8390620?v=4)](https://github.com/fuyibing "fuyibing (92 commits)")[![markwang1992](https://avatars.githubusercontent.com/u/27535360?v=4)](https://github.com/markwang1992 "markwang1992 (65 commits)")[![Captain1](https://avatars.githubusercontent.com/u/4882809?v=4)](https://github.com/Captain1 "Captain1 (53 commits)")[![cathy930627](https://avatars.githubusercontent.com/u/23021920?v=4)](https://github.com/cathy930627 "cathy930627 (30 commits)")[![alicebeer](https://avatars.githubusercontent.com/u/30590495?v=4)](https://github.com/alicebeer "alicebeer (29 commits)")[![z-eli](https://avatars.githubusercontent.com/u/34879889?v=4)](https://github.com/z-eli "z-eli (28 commits)")[![sxhgithub](https://avatars.githubusercontent.com/u/44560432?v=4)](https://github.com/sxhgithub "sxhgithub (27 commits)")[![tlytly1234567](https://avatars.githubusercontent.com/u/14797825?v=4)](https://github.com/tlytly1234567 "tlytly1234567 (27 commits)")[![haolinbird](https://avatars.githubusercontent.com/u/9525008?v=4)](https://github.com/haolinbird "haolinbird (18 commits)")[![lalala1992](https://avatars.githubusercontent.com/u/25025890?v=4)](https://github.com/lalala1992 "lalala1992 (17 commits)")[![meiyfz](https://avatars.githubusercontent.com/u/23737363?v=4)](https://github.com/meiyfz "meiyfz (17 commits)")[![oushouyang](https://avatars.githubusercontent.com/u/26216016?v=4)](https://github.com/oushouyang "oushouyang (16 commits)")

### Embed Badge

![Health badge](/badges/uniondrug-service-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/uniondrug-service-sdk/health.svg)](https://phpackages.com/packages/uniondrug-service-sdk)
```

###  Alternatives

[corejavascript/typeahead.js

fast and fully-featured autocomplete library

970107.4k2](/packages/corejavascript-typeaheadjs)[guava/filament-icons

This package allows you to generate enum classes for ANY blade icon set you have installed, making working with them a breeze!

2622.4k](/packages/guava-filament-icons)

PHPackages © 2026

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