Download the PHP package waffle-commons/async without Composer

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

Discord PHP Version Require PHP CI codecov Latest Stable Version Latest Unstable Version Total Downloads Packagist License

Waffle Async Component

Release: 0.1.0-beta6  |  CHANGELOG.md RFC: RFC-015 (ASYNC-01) — Fiber-based finish-request task deferral

A bounded, worker-safe runner that lifts short post-response work — mail delivery, webhook fan-out, audit writes — out of the user-perceived latency path. Tasks deferred during a request run after the response is flushed to FrankenPHP but before the worker accepts its next request, each inside its own native Fiber for failure isolation. This is finish-request deferral, not background processing: the work runs on the same single worker thread, sequentially, under a hard per-request budget.

The concurrent half of RFC-015 — outbound HTTP fan-out via ConcurrentClientInterface — ships in waffle-commons/http-client, joined to this package only through waffle-commons/contracts.

📦 Installation

🧱 Surface

Class Role
Waffle\Commons\Async\DeferredTaskRunner final runner implementing TaskRunnerInterface and ResettableInterface (declared directly, as igor-php requires). Holds the request-scoped pending queue.
Waffle\Commons\Async\Exception\DeferralBudgetExceededException Thrown by defer() once the per-request budget is exhausted. Implements the contract DeferralBudgetExceededExceptionInterface; exposes budget(): int.
Waffle\Commons\Async\Exception\InvalidBudgetException Thrown at construction when $budget < 1. Implements the contract AsyncExceptionInterface; exposes budget(): int.

The contracts — Waffle\Commons\Contracts\Async\TaskRunnerInterface, DeferredTaskInterface, Exception\AsyncExceptionInterface, Exception\DeferralBudgetExceededExceptionInterface — live in waffle-commons/contracts. Consumers (controllers, the kernel) depend on those interfaces, never on this concrete package.

🚀 Usage

⏱️ The runner

🧵 Worker safety

DeferredTaskRunner's pending queue is the only request-scoped state. It implements ResettableInterface directly (igor-php requires the direct declaration, not one inherited transitively via TaskRunnerInterface), and the kernel calls reset() after every request so no deferred work ever crosses the worker boundary (wfl igor 0 KO). Fibers here are a failure-isolation boundary, not a thread pool — there is exactly one OS thread; two deferred tasks never run simultaneously, they run one after another during finish-request.

Finish-request deferral is deliberately not background processing: it trades a slice of worker throughput for perceived latency, bounded by the hard per-request budget rather than a wall-clock timeout. Routinely wanting to defer dozens of tasks is the tripwire that the work belongs on a real queue/broker instead, not in this budget.

🔌 Wiring (kernel package)

The finish-request drain itself is not in waffle-commons/async — the package stays contracts-only. The kernel package wires:

🐘 PHP 8.5 features used

🧭 Architectural boundary (mago guard)

An active dependency perimeter is enforced on every CI run by vendor/bin/mago guard (bundled into composer mago; zero baselines). The rules live in mago.toml under [guard.perimeter] — a forbidden use statement fails the build, not a reviewer.

Production code under Waffle\Commons\Async may depend only on:

Test code under WaffleTests\Commons\Async is unrestricted (@all). Structural rules are guarded too: interfaces must be named *Interface, Exception\** classes must end in *Exception, and any Enum\** namespace may hold only enum declarations.

Contract-first, component-agnostic by construction: components compose through waffle-commons/contracts, never directly through one another.

🧪 Testing

📚 Documentation

Central framework docs (Diátaxis) for this component:

📄 License

MIT — see LICENSE.md.


All versions of async with dependencies

PHP Build Version
Package Version
Requires php Version ^8.5
psr/log Version ^3.0
waffle-commons/contracts Version self.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 waffle-commons/async contains the following files

Loading the files please wait ...