Easily run code asynchronously
2.8k
Stars
184
Forks
0
Open issues
30
Contributors
AI Analysis
Spatie/Async is a PHP library that simplifies parallel process execution using the PCNTL extension, providing an intuitive API for spawning and managing asynchronous tasks. It is specifically designed for PHP developers who need to run CPU-bound or I/O operations concurrently without complex process management boilerplate. This library is not suitable for applications requiring true async/await patterns in the JavaScript sense or those on shared hosting without PCNTL support.
Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.
AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.
PHP process pool abstraction for parallel task execution via PCNTL, actively maintained but limited by language constraints
spatie/async is a lightweight wrapper around PHP's PCNTL extension that enables process-based parallelism in PHP applications. It provides a fluent API for spawning and managing parallel processes with callbacks for success, failure, and timeout. Adoption appears concentrated in the PHP ecosystem, particularly among teams using Spatie's broader package suite. The project remains actively maintained but is fundamentally constrained by PHP's single-threaded event model and PCNTL availability limitations (Unix/Linux only).
Created in December 2017 by Spatie, a Belgian web agency known for PHP open-source tooling. The project emerged as a pragmatic response to PHP's lack of native async/await primitives, offering process-based parallelism as an alternative. It has accumulated 2.8k stars over 8+ years, reflecting steady but modest adoption within the PHP community.
Growth appears stabilized rather than accelerating. The zero stars gained in the last 7 days and consistent but infrequent updates suggest the project has reached a stable plateau. Adoption likely grew through word-of-mouth within PHP web development circles, particularly agencies and projects already using Spatie packages. The package does not appear to have driven significant new adoption waves recently; it serves an established but narrow use case.
Adoption not verified through README. Packagist download metrics are mentioned as available but not quoted. No documented case studies, testimonials, or named users provided. The project is maintained by Spatie (reputable, well-known PHP firm) which provides some credibility signal, but direct evidence of production deployment at scale is absent from available materials.
Based on README, the library wraps PCNTL functions to provide a pool-based abstraction. Likely uses child process spawning via `proc_open()` or similar, with closures serialized for transmission to child processes. Appears to support process-scoped error handling, timeouts, and early termination via `stop()`. The functional API (`async`/`await` helpers) provides syntactic convenience over object-oriented methods. Implementation details not verifiable from README alone.
README includes a passing tests badge linking to GitHub Actions workflow, indicating active CI/CD. Specific coverage percentages not documented in README.
Last push June 2, 2026 (29 days ago from current date July 1, 2026) suggests active maintenance. Tests passing badge indicates ongoing CI validation. However, zero star activity in past 7 days and no visible release notes in README suggest maintenance is reactive rather than proactive. Project appears in 'active but steady' state rather than growing or dormant.
ADOPT IF: you need simple batch parallelism in legacy or non-async PHP codebases, your workload fits process-spawning overhead, your hosting runs Unix/Linux, and you are already invested in Spatie's ecosystem. AVOID IF: you need low-latency async I/O, Windows hosting is required, you have very frequent short tasks (process overhead prohibitive), or you need reactive/event-driven architecture. MONITOR IF: PHP's async story improves significantly or if your team standardizes on event-loop-based solutions like Amp/Revolt.
Independent dimensions
Mainstream potential
3/10
Technical importance
5/10
Adoption evidence
3/10
- PCNTL extension unavailable on Windows and some shared hosting environments, severely limiting portability.
- Process spawning carries inherent overhead; suitable only for coarse-grained parallelism (seconds+ per task), not fine-grained concurrency.
- Closure serialization can fail with non-serializable state (resources, database connections, etc.), requiring developers to architect carefully.
- Limited language-level async support in PHP means the library solves a narrow use case; teams moving to async-first frameworks (Laravel Octane with fibers, Amp, Swoole) may outgrow it.
- Adoption signals are weak; if Spatie deprioritizes maintenance or the PHP ecosystem shifts, community support may fragment.
Project will likely remain a stable, low-growth utility for PHP teams needing quick parallelism in batch jobs. Unlikely to see significant adoption surge unless PHP's event-loop ecosystem stalls. Most probable trajectory is gradual decline relative to rising async primitives in PHP 8.3+, but continued use in maintenance of existing codebases.
Explore similar
Newsletter
Get analyses like this every Monday
Free weekly digest of the most interesting open-source discoveries.
Languages
Information
- Language
- PHP
- License
- MIT
- Last updated
- 1mo ago
- Created
- 104mo ago
- Analyzed with
- anthropic/claude-haiku-4-5
Stars over time
Contributors over time
Top 100 contributors only — repos with more will plateau at 100.
Open issues
No open issues — clean slate.
Open pull requests
No open pull requests.
Top contributors
Recent releases
Similar repos
| Repository | Stars | Week Δ | Language | Score | Updated |
|---|---|---|---|---|---|
|
|
2.8k | +1 | PHP | 8/10 | 1mo ago |
|
|
1k | — | PHP | 8/10 | 1mo ago |
|
|
2.8k | — | PHP | 8/10 | 4w ago |
|
|
4.4k | — | PHP | 8/10 | 2w ago |
|
|
28.1k | — | JavaScript | 8/10 | 5mo ago |
|
|
1.1k | — | PHP | 8/10 | 5mo ago |
10x larger star count (28k vs 2.8k). Serves JavaScript ecosystem with more native async/await language support. Different problem domain but conceptually similar (parallelism abstraction).
Smaller (1.3k stars) but addresses async I/O via event loop rather than process spawning. Requires explicit async coding patterns; spatie/async offers simpler opt-in parallelism for batch tasks.
Native PHP extension providing comprehensive async runtime. More powerful but requires C++ knowledge and system-level compilation. spatie/async requires only PHP without extension installation.
Similar star count but Python has native async/await keywords. asyncer layers convenience atop language-native primitives; spatie/async works around PHP's synchronous nature via processes.
