PHPackages                             flightphp/async - 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. flightphp/async

ActiveLibrary[Framework](/categories/framework)

flightphp/async
===============

Package to allow you to run Flight on top of asynchronous frameworks like Swoole, ReactPHP, Amp, etc.

v0.1.1(11mo ago)248↓92.9%1MITPHPPHP ^7.4 || ^8.0

Since Jul 19Pushed 11mo ago2 watchersCompare

[ Source](https://github.com/flightphp/async)[ Packagist](https://packagist.org/packages/flightphp/async)[ RSS](/packages/flightphp-async/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (7)Versions (3)Used By (0)

What is Async?
==============

[](#what-is-async)

Async is a package for the Flight framework that allows you to run your Flight apps in asynchronous frameworks like ReactPHP, Swoole, Amp, RoadRunner, Workerman, Adapterman, etc. Currently only configured for [Swoole](https://www.swoole.co.uk/) and [AdapterMan](https://github.com/joanhey/AdapterMan)

Requirements
============

[](#requirements)

- PHP 7.4 or higher
- Swoole extension (for Swoole usage)
- Flight framework 3.16.1 or higher

Installation
============

[](#installation)

Installation is done through composer.

```
composer require flightphp/async
```

For Swoole support, you'll also need to install the Swoole extension:

```
# Using PECL
pecl install swoole

# Or using package manager (Ubuntu/Debian)
sudo apt-get install php-swoole
```

Basic Usage (swoole)
====================

[](#basic-usage-swoole)

Here is a simple example of how to use Flight Async where you can use Swoole or PHP-FPM as the server driver within the same project. This allows for you to develop your application using the PHP-FPM driver for better debugging and then switch to Swoole for production.

Setup
-----

[](#setup)

First you'll need the following files in your project:

### index.php

[](#indexphp)

```
