pardnchiu / async
This package is abandoned and no longer maintained.
No replacement package was suggested.
PD\Async is a PHP library using ReactPHP to perform asynchronous tasks, supporting task dependency handling and topological sorting.
Package info
pkg:composer/pardnchiu/async
1.0.0
2025-02-02 19:53 UTC
Requires
- php: >=7.4
- react/event-loop: ^1.1 || ^2.0
- react/promise: ^2.8 || ^3.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Last updated: 2026-10-25
Note
This README was generated by SKILL, get the ZH version from here.
DECLARE THE DEPENDENCIES, LET THE PROMISES RUN THEM!
A PHP library with ReactPHP promise orchestration, declarative task dependencies, and circular dependency detection
Table of Contents
Features
composer require pardnchiu/async· Documentation
- Declarative Task Dependencies — Describe each task and its prerequisites in a plain array instead of wiring promise chains by hand.
- Circular Dependency Detection — A depth-first walk checks the dependency graph before any task is created and throws an exception naming the offending task.
- One Promise for All Results — Every task resolves into a single ReactPHP promise that yields a result array keyed by task name.
- Automatic Error Propagation — Any task that throws rejects its own promise and routes the whole run into the catch branch.
- Minimal Footprint — One static method, only react/promise and react/event-loop as dependencies, and PHP 7.4+ support.
Architecture
graph TB
A[Task Definition Array] --> B[Async::run]
B --> C[Dependency Graph Build]
C --> D[Topological Sort / Cycle Check]
D --> E[Deferred Promise Creation]
E --> F[Promise\all Aggregation]
F --> G[Result Array / Exception]
Loading
License
This project is licensed under the MIT LICENSE.
Author
Just open an issue to share an idea.
©️ 2024 邱敬幃 Pardn Chiu