PHPackages                             swoole/ide-helper - 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. swoole/ide-helper

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

swoole/ide-helper
=================

IDE help files for Swoole.

6.2.2(3w ago)5207.2M↓14.5%6920Apache-2.0PHPCI passing

Since Mar 12Pushed 2w ago29 watchersCompare

[ Source](https://github.com/swoole/ide-helper)[ Packagist](https://packagist.org/packages/swoole/ide-helper)[ RSS](/packages/swoole-ide-helper/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (10)DependenciesVersions (107)Used By (20)

Swoole IDE Helper
=================

[](#swoole-ide-helper)

[![Latest Stable Version](https://camo.githubusercontent.com/b9435c849d8c0817b49a05ffeb684f360950c50b978cf223e11e86722c985738/68747470733a2f2f706f7365722e707567782e6f72672f73776f6f6c652f6964652d68656c7065722f762f737461626c652e737667)](https://packagist.org/packages/swoole/ide-helper)[![License](https://camo.githubusercontent.com/ee203f2ee622fb10c45d0e3734ffa1f41195962606f72211eced140f0a55993f/68747470733a2f2f706f7365722e707567782e6f72672f73776f6f6c652f6964652d68656c7065722f6c6963656e7365)](LICENSE)

[Swoole](https://github.com/swoole/swoole-src) is a PHP extension written in C/C++, so its classes, functions, and constants don't exist as PHP source code anywhere in your project. Without help, your IDE can't see them: no autocompletion, no parameter hints, no inline documentation, and plenty of "undefined class" warnings.

This package fixes that. It provides fully documented stub files for everything Swoole exposes — every class, method, function, and constant, with accurate signatures, native type declarations, and PHPDoc descriptions. Once it's installed, IDEs like PhpStorm and VS Code (with a PHP language server such as Intelephense) pick up the stubs automatically and give you the same editing experience you'd get with a pure-PHP library.

The stubs contain no executable logic — every method body is empty — so the package has zero runtime footprint.

Installation
------------

[](#installation)

Install it with [Composer](https://getcomposer.org) as a dev dependency:

```
composer require --dev swoole/ide-helper
```

Since the package is only there to assist your IDE, it doesn't belong in production; `--dev` keeps it out of `composer install --no-dev` deployments.

### Match the version to your Swoole extension

[](#match-the-version-to-your-swoole-extension)

Releases of this package mirror Swoole releases: version `6.0.2` of this package documents Swoole `v6.0.2`. For the most accurate results, pin the package to the Swoole version you actually run. You can check your installed version with:

```
php --ri swoole | grep Version
```

Then require the matching release, e.g.:

```
composer require --dev swoole/ide-helper:~6.0.2
```

To use the latest unreleased stubs from the `master` branch instead:

```
composer require --dev swoole/ide-helper:@dev
```

Best practices
--------------

[](#best-practices)

- **Keep it a dev dependency.** The stubs are for your editor only. They declare no autoloading and execute nothing, but there's still no reason to ship them to production.
- **Upgrade the helper when you upgrade Swoole.** Signatures and available symbols change between Swoole releases; a mismatched helper version means your IDE may suggest methods that don't exist in your runtime (or miss ones that do).
- **PhpStorm users: disable the bundled Swoole stubs.** PhpStorm ships its own (less complete) Swoole stubs, which conflict with this package and cause "multiple definitions exist" warnings. Go to **Settings → PHP → Stubs** and deselect `swoole`, so this package becomes the single source of truth.
- **Don't `require`/`include` the stub files.** If the Swoole extension is loaded, redefining its classes would fail; if it isn't, empty method bodies would do nothing useful anyway. Just let Composer install the package and let your IDE index it.

What's included
---------------

[](#whats-included)

- `src/swoole/` — stubs for everything implemented in C/C++ by the Swoole extension:
    - all classes under the `Swoole\` namespace (one file per class, e.g. `Swoole\Coroutine\Http\Client`);
    - global `swoole_*()` functions;
    - `SWOOLE_*` constants;
    - short class aliases like `Co\Channel` (active when the `swoole.use_shortname` ini directive is on).
- `src/swoole_library/` — the PHP source of [Swoole Library](https://github.com/swoole/library), the userland companion code that ships inside the extension (loaded when `swoole.enable_library` is on). Included so your IDE can index these classes too.

PHP configuration settings
--------------------------

[](#php-configuration-settings)

Swoole's behavior can be tuned with the following ini directives:

- `swoole.display_errors`: Boolean. Default `On`. Display/hide error information from Swoole.
- `swoole.enable_coroutine`: Boolean. Default `On`. Turn on/off coroutine support.
- `swoole.enable_library`: Boolean. Default `On`. Load the source code from [Swoole Library](https://github.com/swoole/library) or not.
- `swoole.enable_preemptive_scheduler`: Boolean. Default `Off`. Enable preemptive scheduler or not. To understand how it works, please check examples under section "CPU-intensive job scheduling" of repository [deminy/swoole-by-examples](https://github.com/deminy/swoole-by-examples).
- `swoole.unixsock_buffer_size`: Integer (in bytes). By default, it's 256 KiB on Macintosh or FreeBSD, otherwise 8 MiB. The total buffer sizes for the socket connections between the master process and the worker processes in Swoole.
- `swoole.use_shortname`: Boolean. Default `On`. Support short names or not. Short names are all the aliases listed in file [src/swoole/shortnames.php](src/swoole/shortnames.php).

All the directives can be set anywhere except `swoole.use_shortname`, which can only be set in `php.ini` files.

###  Health Score

75

—

ExcellentBetter than 100% of packages

Maintenance96

Actively maintained with recent releases

Popularity66

Solid adoption and visibility

Community57

Growing community involvement

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 88.5% 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 ~26 days

Recently: every ~0 days

Total

105

Last Release

25d ago

Major Versions

4.8.x-dev → 5.0.32023-04-28

5.1.3 → 6.0.0-alpha2024-06-24

5.1.6 → 6.0.0-rc12024-12-02

5.1.7 → 6.0.12025-03-23

5.1.8 → 6.1.02026-07-25

### Community

Maintainers

![](https://www.gravatar.com/avatar/e1dea9261ba377a13a16e7e0f3883e73bda4094551ddea280e852f23a5d248c0?d=identicon)[Tianfeng.Han](/maintainers/Tianfeng.Han)

![](https://avatars.githubusercontent.com/u/865547?v=4)[Demin Yin](/maintainers/deminy)[@deminy](https://github.com/deminy)

![](https://www.gravatar.com/avatar/1bdf9390d85a45dad64fe58584f55824c12a134a04e338d6259845683d9db137?d=identicon)[twosee](/maintainers/twosee)

---

Top Contributors

[![deminy](https://avatars.githubusercontent.com/u/865547?v=4)](https://github.com/deminy "deminy (377 commits)")[![twose](https://avatars.githubusercontent.com/u/25978241?v=4)](https://github.com/twose "twose (16 commits)")[![matyhtf](https://avatars.githubusercontent.com/u/2017766?v=4)](https://github.com/matyhtf "matyhtf (10 commits)")[![sy-records](https://avatars.githubusercontent.com/u/33931153?v=4)](https://github.com/sy-records "sy-records (9 commits)")[![claude](https://avatars.githubusercontent.com/u/81847?v=4)](https://github.com/claude "claude (2 commits)")[![mrVrAlex](https://avatars.githubusercontent.com/u/633883?v=4)](https://github.com/mrVrAlex "mrVrAlex (2 commits)")[![nimrc](https://avatars.githubusercontent.com/u/7780697?v=4)](https://github.com/nimrc "nimrc (1 commits)")[![persiliao](https://avatars.githubusercontent.com/u/19988497?v=4)](https://github.com/persiliao "persiliao (1 commits)")[![proilyxa](https://avatars.githubusercontent.com/u/60401505?v=4)](https://github.com/proilyxa "proilyxa (1 commits)")[![takeokunn](https://avatars.githubusercontent.com/u/11222510?v=4)](https://github.com/takeokunn "takeokunn (1 commits)")[![MrMeshok](https://avatars.githubusercontent.com/u/72924086?v=4)](https://github.com/MrMeshok "MrMeshok (1 commits)")[![AlvisZhang](https://avatars.githubusercontent.com/u/2044208?v=4)](https://github.com/AlvisZhang "AlvisZhang (1 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![evalor](https://avatars.githubusercontent.com/u/26944445?v=4)](https://github.com/evalor "evalor (1 commits)")[![kiss291323003](https://avatars.githubusercontent.com/u/24490609?v=4)](https://github.com/kiss291323003 "kiss291323003 (1 commits)")[![abnegate](https://avatars.githubusercontent.com/u/5857008?v=4)](https://github.com/abnegate "abnegate (1 commits)")

---

Tags

autocompletionide-helpersphpswooletypehinting

### Embed Badge

![Health badge](/badges/swoole-ide-helper/health.svg)

```
[![Health](https://phpackages.com/badges/swoole-ide-helper/health.svg)](https://phpackages.com/packages/swoole-ide-helper)
```

###  Alternatives

[markfullmer/dependency_tree

Generate a Composer dependency tree visualization

168.2k](/packages/markfullmer-dependency-tree)

PHPackages © 2026

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