PHPackages                             mix/sync-invoke - 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. mix/sync-invoke

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

mix/sync-invoke
===============

Swoole synchronous blocking code invoke library

v2.2.16(5y ago)31.6k12Apache-2.0PHPPHP &gt;=7.0.0CI failing

Since Dec 4Pushed 5y ago1 watchersCompare

[ Source](https://github.com/mix-php/sync-invoke)[ Packagist](https://packagist.org/packages/mix/sync-invoke)[ Docs](https://openmix.org/)[ RSS](/packages/mix-sync-invoke/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependencies (6)Versions (15)Used By (2)

Mix Sync Invoke
---------------

[](#mix-sync-invoke)

Swoole 同步阻塞代码调用库，用于执行无法被 Swoole Hook 协程化的同步阻塞代码

Usage
-----

[](#usage)

- 安装

```
composer require mix/sync-invoke

```

- Server

创建服务器，用于执行同步代码，第二个参数为 `true` 可复用端口

```
$server = new \Mix\SyncInvoke\Server(9505, true);
$server->start();

```

- Client

```
$dialer = new \Mix\SyncInvoke\Client\Dialer();
$client = $dialer->dial(9505);
$data   = $client->invoke(function () {
    $obj = new Hello();
    return [1, 2, 3, $obj];
});
var_dump($data);

```

License
-------

[](#license)

Apache License Version 2.0,

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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 ~25 days

Total

14

Last Release

2029d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16074765?v=4)[LIU JIAN](/maintainers/onanying)[@onanying](https://github.com/onanying)

---

Top Contributors

[![onanying](https://avatars.githubusercontent.com/u/16074765?v=4)](https://github.com/onanying "onanying (47 commits)")

---

Tags

invokeswooleblocksyncmix

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mix-sync-invoke/health.svg)

```
[![Health](https://phpackages.com/badges/mix-sync-invoke/health.svg)](https://phpackages.com/packages/mix-sync-invoke)
```

###  Alternatives

[php-di/invoker

Generic and extensible callable invoker

26857.8M56](/packages/php-di-invoker)[mix/mix

PHP CLI mode development framework

1.9k1.2k](/packages/mix-mix)[hyperf/di

A DI for Hyperf.

182.8M594](/packages/hyperf-di)[mix/mix-skeleton

Full-featured development skeleton

132.1k](/packages/mix-mix-skeleton)

PHPackages © 2026

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