PHPackages                             octo-php/symfony-bundle - 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. [Framework](/categories/framework)
4. /
5. octo-php/symfony-bundle

ActiveSymfony-bundle[Framework](/categories/framework)

octo-php/symfony-bundle
=======================

Symfony Bundle for the Async PHP Platform — auto-configuration, service wiring, ResetHook auto-tagging, Flex recipe, and optional package auto-detection.

v0.1.2(2mo ago)001MITPHPPHP &gt;=8.4

Since Mar 3Pushed 2mo agoCompare

[ Source](https://github.com/LaProgrammerie/octo-php-symfony-bundle)[ Packagist](https://packagist.org/packages/octo-php/symfony-bundle)[ RSS](/packages/octo-php-symfony-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (7)Versions (2)Used By (1)

octo-php/symfony-bundle
=======================

[](#octo-phpsymfony-bundle)

Bundle Symfony pour la plateforme async PHP — auto-configuration des services, recipe Flex, auto-détection des packages optionnels.

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

[](#installation)

```
composer require octo-php/symfony-bundle
```

Si Symfony Flex est activé, la recipe crée automatiquement :

- `config/packages/octo.yaml` — configuration par défaut
- `bin/async-server.php` — script de bootstrap
- Variables d'environnement dans `.env`

### Enregistrement manuel (sans Flex)

[](#enregistrement-manuel-sans-flex)

```
// config/bundles.php
return [
    // ...
    Octo\SymfonyBundle\OctoBundle::class => ['all' => true],
];
```

Configuration YAML
------------------

[](#configuration-yaml)

```
# config/packages/octo.yaml
octo:
    # Seuil RSS en bytes pour warning mémoire (défaut: 100 Mo)
    memory_warning_threshold: 104857600

    # Seuil durée reset en ms pour warning (défaut: 50)
    reset_warning_ms: 50

    # Reboot kernel tous les N requêtes (0 = désactivé)
    kernel_reboot_every: 0

    # Configuration Messenger (si octo-php/symfony-messenger installé)
    messenger:
        channel_capacity: 100
        consumers: 1
        send_timeout: 5.0

    # Configuration Realtime (si octo-php/symfony-realtime installé)
    realtime:
        ws_max_lifetime_seconds: 3600

    # Configuration OTEL (si octo-php/symfony-otel installé)
    otel:
        enabled: true
```

La configuration YAML est mappée vers les variables d'environnement `OCTOP_SYMFONY_*`.

Services auto-enregistrés
-------------------------

[](#services-auto-enregistrés)

Le bundle enregistre automatiquement dans le container Symfony :

- `HttpKernelAdapter` — callable handler pour `ServerBootstrap::run()`
- `ResetManager` — gestion du reset entre requêtes
- `RequestIdProcessor` — processeur Monolog (auto-enregistré si Monolog disponible)
- `MetricsBridge` — pont vers le `MetricsCollector` du runtime pack

Auto-tagging ResetHookInterface
-------------------------------

[](#auto-tagging-resethookinterface)

Les services implémentant `Octo\SymfonyBridge\ResetHookInterface` sont automatiquement taggés et injectés dans le `ResetManager` via le `ResetHookCompilerPass`.

```
// Aucune configuration manuelle requise — le bundle détecte et enregistre les hooks
final class MyResetHook implements ResetHookInterface
{
    public function reset(): void { /* ... */ }
}
```

Auto-détection des packages optionnels
--------------------------------------

[](#auto-détection-des-packages-optionnels)

Le bundle détecte automatiquement les packages de la suite installés via `class_exists()` :

Package installéEffet`octo-php/symfony-messenger`Transport `OpenSwooleTransport` + factory enregistrés`octo-php/symfony-realtime``WebSocketHandler` + helpers SSE enregistrés`octo-php/symfony-otel`Span processor + metrics exporter configurésSi un package n'est pas installé, aucune erreur n'est levée.

Recipe Flex
-----------

[](#recipe-flex)

La recipe crée les fichiers suivants :

### `bin/async-server.php`

[](#binasync-serverphp)

Script de bootstrap qui boot le kernel Symfony et démarre le serveur OpenSwoole :

```
php bin/async-server.php
```

### `.env`

[](#env)

```
OCTOP_SYMFONY_MEMORY_WARNING_THRESHOLD=104857600
OCTOP_SYMFONY_RESET_WARNING_MS=50
OCTOP_SYMFONY_KERNEL_REBOOT_EVERY=0
```

Profiler en mode long-running
-----------------------------

[](#profiler-en-mode-long-running)

Le Profiler Symfony fonctionne en mode dev, avec une limitation importante :

Le stockage in-memory du profiler n'est **pas supporté** en long-running (les données seraient accumulées entre requêtes et provoqueraient des leaks mémoire). Le stockage du profiler **doit** utiliser le filesystem ou SQLite :

```
# config/packages/dev/web_profiler.yaml
framework:
    profiler:
        dsn: 'file:%kernel.cache_dir%/profiler'
        # ou : dsn: 'sqlite:%kernel.cache_dir%/profiler.db'
```

Les données profiler des requêtes précédentes sont accessibles via `/_profiler`.

Optionalité du bundle
---------------------

[](#optionalité-du-bundle)

Le bundle est optionnel. Le core bridge (`octo-php/symfony-bridge`) reste utilisable sans le bundle en mode callable handler pur. Voir le [README du core bridge](../symfony-bridge/) pour le bootstrap manuel.

Licence
-------

[](#licence)

MIT

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance85

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community8

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

76d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e3192df86b9648428e1ad85643809f814e4a2f48279370f8bd39dc4fcacb0365?d=identicon)[laprogrammerie](/maintainers/laprogrammerie)

---

Top Contributors

[![matthieuwerner](https://avatars.githubusercontent.com/u/3184545?v=4)](https://github.com/matthieuwerner "matthieuwerner (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/octo-php-symfony-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/octo-php-symfony-bundle/health.svg)](https://phpackages.com/packages/octo-php-symfony-bundle)
```

###  Alternatives

[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)

PHPackages © 2026

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