Skip to content

true-async/symfony-spawn

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

symfony-spawn

Symfony adapter for PHP TrueAsync.

Requirements

  • PHP 8.6+ with the TrueAsync extension
  • Symfony 7.0 or 8.0
  • ext-pcntl, ext-pdo

Installation

composer require yangusik/symfony-spawn
// config/bundles.php
Spawn\Symfony\TrueAsyncBundle::class => ['all' => true],

The runtime is registered automatically via composer.json. That's it.

Running

php bin/console async:serve

php bin/console async:serve --host=0.0.0.0 --port=9000

FrankenPHP worker mode is detected automatically via FRANKENPHP_WORKER.

Doctrine

When doctrine/orm is installed, the bundle automatically enables TrueAsync's PDO connection pool and isolates transaction state per coroutine.

Default pool settings (override in config/packages/true_async.yaml):

true_async:
    db_pool:
        enabled: true
        min: 2
        max: 10
        healthcheck_interval: 30

License

MIT

About

Symfony Spawn is an async runtime for Symfony powered by PHP TrueAsync. It runs multiple requests concurrently in isolated coroutines within a single worker, eliminating shared state issues while delivering high performance without threads or process overhead.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • PHP 100.0%