Download the PHP package flightphp/async without Composer

On this page you can find all versions of the php package flightphp/async. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package 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 and AdapterMan

Requirements

Installation

Installation is done through composer.

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

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

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

index.php

swoole_server.php

SwooleServerDriver.php

Running the server

Development Mode (PHP Built-in Server)

To run the server with PHP-FPM for development, you can use the following command in your terminal:

Production Mode (Swoole)

When you are ready for production, you can switch to Swoole by running the following command:

Daemonizing the Swoole Server

If you want the Swoole server to run in the background (daemonized), you can modify the configuration in the SwooleServerDriver.php file by changing:

Note: Swoole runs as its own process and is not a full-fledged web server like Apache or Nginx. You'll likely want to use a reverse proxy with Nginx or Apache to handle SSL termination, load balancing, and serving static files.

Configuration

The SwooleServerDriver class includes several configuration options that you can customize:

Error Handling

The AsyncBridge handles Flight exceptions and converts them to appropriate HTTP responses. You can also add custom error handling in your routes:

License

Flight Async is released under the MIT license.


All versions of async with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0
flightphp/core Version ^3.16
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package flightphp/async contains the following files

Loading the files please wait ...