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

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

sflightning/runtime
===================

Lightning runtime

014PHP

Since May 27Pushed 4y ago1 watchersCompare

[ Source](https://github.com/BaptisteContreras/lightning-runtime)[ Packagist](https://packagist.org/packages/sflightning/runtime)[ RSS](/packages/sflightning-runtime/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Lightning Runtime
=================

[](#lightning-runtime)

A runtime for [Symfony](https://symfony.com/) applications using [Swoole](https://www.swoole.co.uk/). Based on the [Php Swoole Runtime](https://github.com/php-runtime/swoole).

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

**Still in development**

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

[](#installation)

```
 composer require sflightning/runtime

```

Usage
-----

[](#usage)

Define the environment variable `APP_RUNTIME` for your application.

```
APP_RUNTIME=Sflightning\Runtime\LightningRuntime

```

### 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``settings`All Swoole's server settings ([swoole.co.uk/docs/modules/swoole-server/configuration](https://www.swoole.co.uk/docs/modules/swoole-server/configuration))`[]````
// public/index.php

use App\Kernel;

$_SERVER['APP_RUNTIME_OPTIONS'] = [
    'host' => '0.0.0.0',
    'port' => 9501,
    'mode' => SWOOLE_BASE,
    'settings' => [
        \Swoole\Constant::OPTION_WORKER_NUM => swoole_cpu_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

16

—

LowBetter than 4% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity26

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/29d32f0de7bf0abd199486576ed2251e0b40d1f4312330f74c842a226a244947?d=identicon)[BaptisteContreras](/maintainers/BaptisteContreras)

---

Top Contributors

[![BaptisteContreras](https://avatars.githubusercontent.com/u/38988658?v=4)](https://github.com/BaptisteContreras "BaptisteContreras (16 commits)")

### Embed Badge

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

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

###  Alternatives

[happy-types/enumerable-type

Strongly typed implementation of enumerable type in PHP which helps us to write a safer more readable code.

4643.1k](/packages/happy-types-enumerable-type)[codeconsortium/ccdn-forum-bundle

CCDN Forum Bundle

6015.4k1](/packages/codeconsortium-ccdn-forum-bundle)

PHPackages © 2026

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