darkwood/flow
Flow is a PHP 8.5+ package for building asynchronous pipelines with a functional style. Define steps with generators, pass typed data through each stage, and await execution. Includes examples and docs, with a focus on assembling code as “flows”.
Flow embark multiple drivers.
Drivers are useful to essentially provide asynchronous programming by using coroutines. Thus, this can be implemented in severals ways in most popular programming languages.
Coroutine are very similar to threads and provide concurrency but not parallelism. Advantage of using coroutine :
To use Amp Driver, you have to require the library with composer
composer require amphp/amp
More documentation can be found https://amphp.org
More documentation can be found https://www.php.net/manual/fr/language.fibers.php
To use ReactPHP Driver, you have to require the library with composer
composer require react/async
More documentation can be found https://reactphp.org
To use Spatie Driver, you have to require the library with composer
composer require spatie/async
More documentation can be found https://github.com/spatie/async
To use Swoole Driver, you have to add the extension with your current running PHP
pecl install openswoole-22.0.0
More documentation can be found https://openswoole.com
To use Parallel Driver, you have to require the library with PECL
pecl install parallel
More documentation can be found https://www.php.net/manual/en/book.parallel.php
You can make your custom driver by implementing Flow\DriverInterface
How can I help you explore Laravel packages today?