PHPackages                             seffeng/wechat - 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. seffeng/wechat

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

seffeng/wechat
==============

PHP extension wechat

v0.1.5(5y ago)06911MITPHPPHP &gt;=7.1.3

Since Feb 23Pushed 4y ago1 watchersCompare

[ Source](https://github.com/seffeng/php-wechat)[ Packagist](https://packagist.org/packages/seffeng/wechat)[ Docs](https://github.com/seffeng/php-wechat)[ RSS](/packages/seffeng-wechat/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (6)Dependencies (2)Versions (7)Used By (1)

SmsClient
---------

[](#smsclient)

当前版本不好用
=======

[](#当前版本不好用)

```
# 当前版本不好用
```

### 安装

[](#安装)

```
$ composer require seffeng/wechat

```

### 目录说明

[](#目录说明)

```
├─src
│  │  Wechat.php
│  ├─Errors
│  │      Error.php
│  ├─Exceptions
│  │      WechatException.php
│  └─Helpers
│         ArrayHelper.php
└─tests
    WechatTest.php

```

### 示例

[](#示例)

```
/**
 * SiteController
 */
use Seffeng\Wechat\Wechat;
use Seffeng\Wechat\Exceptions\WechatException;

class SiteController extends Controller
{
    public function index()
    {
        try {
            $appid = '';
            $secret = '';

            /**
             * 缓存处理类，提供 get($key) 和 set($key, $value, $ttl) 方法
             *
             * 可实现接口 Seffeng\Wechat\Contracts\Cache
             */
            $cacheClass = null;
            $wechat = new Wechat($appid, $secret, null, $cacheClass);
            var_dump($wechat->getAccessToken());
            var_dump($wechat->getJsapiTicket());
            print_r($wechat->getSignPackage('https://url.cn'));
        } catch (WechatException $e) {
            echo $e->getMessage();
        } catch (\Exception $e) {
            echo $e->getMessage();
        }
    }
}
```

### 备注

[](#备注)

1、测试脚本 tests/WechatTest.php 仅作为示例供参考。

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~6 days

Total

6

Last Release

1879d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/30b3d8cc986a1ad37a55169b11812fea1cae31430dd8dbe1b3436dc58cc885bd?d=identicon)[seffeng](/maintainers/seffeng)

---

Top Contributors

[![seffeng](https://avatars.githubusercontent.com/u/3509779?v=4)](https://github.com/seffeng "seffeng (10 commits)")

---

Tags

phplaravelyii2wechatseffeng

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/seffeng-wechat/health.svg)

```
[![Health](https://phpackages.com/badges/seffeng-wechat/health.svg)](https://phpackages.com/packages/seffeng-wechat)
```

###  Alternatives

[stevebauman/location

Retrieve a user's location by their IP Address

1.3k7.6M65](/packages/stevebauman-location)[gehrisandro/tailwind-merge-laravel

TailwindMerge for Laravel merges multiple Tailwind CSS classes by automatically resolving conflicts between them

341682.2k18](/packages/gehrisandro-tailwind-merge-laravel)[amranidev/laracombee

Recommendation system for laravel

11636.7k1](/packages/amranidev-laracombee)[ymlluo/group-robot

钉钉、企业微信、飞书 自定义群组机器人。支持链式语法创建发送消息。支持文本、Markdown、图片、文件、图文、卡片等消息。

233.8k1](/packages/ymlluo-group-robot)

PHPackages © 2026

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