Download the PHP package pogo/async without Composer

On this page you can find all versions of the php package pogo/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

Pogo

Request-scoped parallel PHP tasks for FrankenPHP.

Pogo lets one PHP request spawn independent tasks in FrankenPHP worker pools, await their results, and return a response after the fan-out/fan-in work is done. It is built for bounded work such as independent API calls, CPU work, or response fragments.

Pogo is not a queue. Tasks are tied to the current request. There is no persistence, retry system, delay API, scheduler, event loop, fiber abstraction, or framework adapter in the core module.

API

Pogo exposes three native PHP functions:

Example:

pogo_await() throws RuntimeException for unknown tasks, timeouts, worker failures, invalid worker responses, and task exceptions returned by the worker. pogo_pool_size() throws RuntimeException when Pogo is not configured or the pool name is unknown.

Task Contract

There is no required Composer package and no required interface. A task class only needs to be autoloadable by your worker and expose a public handle(array $args): mixed method:

Arguments and return values must be JSON-compatible. Resources, closures, cyclic data, and unserializable objects are unsupported.

Worker Contract

Your application owns the worker bootstrap. The worker receives:

and must return one of these JSON-compatible envelopes:

The example worker in example/worker.php is a small production template: it boots the app, validates the payload, instantiates the class, calls handle(array $args), and converts exceptions to the error envelope.

Caddy

Configure Pogo as a FrankenPHP/Caddy global option. The top-level worker is the default pool. Add named pools when you need isolation for slow APIs, CPU-heavy tasks, or critical work.

Pool directives:

Task IDs are globally unique, so pogo_await() does not need the pool name.

Production Notes

Use Pogo for tasks that can safely fail with the request or be retried by the caller. Keep tasks bounded by request timeouts and pool max_wait values.

Use separate pools for workloads with different latency or capacity profiles. For example, do not run slow third-party API calls and CPU-heavy transforms in the same worker pool unless they can block each other safely.

Call pogo_await() for every task you need. Unawaited tasks are canceled at request shutdown.

Example

Build and run the included smoke app:

The response should show two sleeping tasks finishing in roughly one sleep duration, not the sum of both sleeps.

Build

Build a FrankenPHP binary that includes Pogo with xcaddy:

Then copy your app, worker script, and Caddyfile into the runner image.

Test

Run the full example smoke check:

Package

Go module: github.com/y-l-g/pogo/module


All versions of async with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
ext-json Version *
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 pogo/async contains the following files

Loading the files please wait ...