PHPackages                             zerai/openswoole-runtime - 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. zerai/openswoole-runtime

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

zerai/openswoole-runtime
========================

A openswoole runtime component.

0.1.0(3y ago)111.4kMITPHPPHP &gt;=8.0.5

Since Dec 30Pushed 3y ago1 watchersCompare

[ Source](https://github.com/zerai/openswoole-runtime)[ Packagist](https://packagist.org/packages/zerai/openswoole-runtime)[ Docs](https://github.com/zerai/openswoole-runtime)[ RSS](/packages/zerai-openswoole-runtime/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (8)Versions (2)Used By (0)

OpenSwoole Runtime
==================

[](#openswoole-runtime)

A runtime for [OpenSwoole](https://openswoole.com/).

If you are new to the Symfony Runtime component, read more in the [main readme](https://github.com/php-runtime/runtime).

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

[](#installation)

```
composer require zerai/openswoole-runtime

```

Usage
-----

[](#usage)

Define the environment variable `APP_RUNTIME` for your application.

```
APP_RUNTIME=Zerai\OpenSwoole\Runtime

```

### Pure PHP

[](#pure-php)

```
// public/index.php

use OpenSwoole\Http\Request;
use OpenSwoole\Http\Response;

require_once dirname(__DIR__).'/vendor/autoload_runtime.php';

return function () {
    return function (Request $request, Response $response) {
        $response->header("Content-Type", "text/plain");
        $response->end("Hello World\n");
    };
};
```

### Symfony

[](#symfony)

```
// public/index.php

use App\Kernel;

require_once dirname(__DIR__).'/vendor/autoload_runtime.php';

return function (array $context) {
    return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
};
```

Using Options
-------------

[](#using-options)

You can define some configurations using Symfony's Runtime `APP_RUNTIME_OPTIONS` API.

OptionDescriptionDefault`host`The host where the server should binds to (precedes `SWOOLE_HOST` environment variable)`127.0.0.1``port`The port where the server should be listing (precedes `SWOOLE_PORT` environment variable)`8000``mode`Swoole's server mode (precedes `SWOOLE_MODE` environment variable)`SWOOLE_PROCESS``hot_reload`Enable server hot reload mode (precedes `SWOOLE_HOT_RELOAD` environment variable). Require server mode as SWOOLE\_PROCESS`0``settings`All Swoole's server settings ()`[]````
// public/index.php

use App\Kernel;

$_SERVER['APP_RUNTIME_OPTIONS'] = [
    'host' => '0.0.0.0',
    'port' => 9501,
    'mode' => SWOOLE_PROCESS,
    'hot-reload' => false,
    'settings' => [
        \Swoole\Constant::OPTION_WORKER_NUM => 2,
        \Swoole\Constant::OPTION_ENABLE_STATIC_HANDLER => true,
        \Swoole\Constant::OPTION_DOCUMENT_ROOT => dirname(__DIR__).'/public'
    ],
];

require_once dirname(__DIR__).'/vendor/autoload_runtime.php';

return function (array $context) {
    return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
};
```

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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

Unknown

Total

1

Last Release

1281d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7d51ae970b2a5a1cee867a4426c457841fd61409077b8182332b4ee34c232e0e?d=identicon)[teclaizerai](/maintainers/teclaizerai)

---

Top Contributors

[![zerai](https://avatars.githubusercontent.com/u/2405279?v=4)](https://github.com/zerai "zerai (9 commits)")

---

Tags

openswoolesymfony runtime

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/zerai-openswoole-runtime/health.svg)

```
[![Health](https://phpackages.com/badges/zerai-openswoole-runtime/health.svg)](https://phpackages.com/packages/zerai-openswoole-runtime)
```

###  Alternatives

[symplify/monorepo-builder

Not only Composer tools to build a Monorepo.

5275.9M121](/packages/symplify-monorepo-builder)[phpactor/phpactor

PHP refactoring and intellisense tool for text editors

1.9k17.1k1](/packages/phpactor-phpactor)[phpdocumentor/reflection

Reflection library to do Static Analysis for PHP Projects

12525.9M149](/packages/phpdocumentor-reflection)[sylius/promotion

Flexible promotion management for PHP applications.

28505.6k15](/packages/sylius-promotion)[sylius/money-bundle

Currencies and money formatting engine bundle for Symfony.

19681.3k26](/packages/sylius-money-bundle)[sylius/product

Product catalog system with support for product options and variants.

24394.2k22](/packages/sylius-product)

PHPackages © 2026

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