Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

React Adapter Laravel Package

php-http/react-adapter

ReactPHP adapter for the PHP-HTTP httplug abstraction. It lets you send asynchronous, non-blocking HTTP requests through ReactPHP's event loop using the standard httplug and PSR-7 interfaces, so existing client code keeps working unchanged.

Deep Wiki
Context7

Technical Evaluation

Architecture fit: php-http/react-adapter is an HTTPlug adapter for ReactPHP’s HTTP client, not a Laravel-native HTTP abstraction. It fits only where an application already owns or can safely own a ReactPHP event loop, such as CLI daemons, queue workers, or internal high-concurrency service calls. It is a poor fit for standard Laravel FPM request/response paths, where synchronous Guzzle-based Illuminate\Http\Client is the expected model. Laravel Octane does not make this a natural fit because Octane’s workers use Swoole/RoadRunner, not ReactPHP.

Integration feasibility: Composer installation is straightforward, and the package can be bound into Laravel’s container behind HTTPlug/PSR-7 interfaces. The real integration cost is lifecycle ownership: the adapter expects a running ReactPHP event loop, while Laravel’s default HTTP client and most application code assume blocking calls. Mixing the two in one request path creates deadlock, timeout, and error-handling risk. Feasibility is therefore moderate only for an isolated async module, and low for broad replacement of Laravel’s HTTP client.

Technical risk: The package has low adoption signals: 19 stars, a last release in November 2022, and a low opportunity score. Primary risks are maintenance stagnation, compatibility drift with ReactPHP/PHP versions, HTTPlug-to-PSR-18 migration ambiguity, and weak ecosystem support. Async execution also introduces promise rejection handling, event-loop blocking, connection pooling, cancellation, and observability concerns that are not typical Laravel operational concerns. MIT licensing is acceptable, but security patching and upstream responsiveness are uncertain.

Key questions: Which ReactPHP, HTTPlug, PSR-7, and PHP versions are actually supported and tested? Is the package PSR-18 compatible or strictly HTTPlug async? Where will the event loop be owned and terminated? Does the use case require true async concurrency, or would Laravel’s queue plus Guzzle suffice? How will timeouts, retries, idempotency, and cancellation map to Laravel conventions? What is the fallback if the package is abandoned? Can the team operate and debug ReactPHP-based workers in production?

Integration Approach

Stack fit: Use the adapter as an isolated infrastructure dependency, not as a global Laravel HTTP replacement. Keep Illuminate\Http\Client/Guzzle for normal web requests and bind Http\Client\HttpAsyncClient or equivalent HTTPlug interfaces to the React adapter only inside a dedicated CLI command, worker, or service module. Encapsulate it behind an application-owned interface so callers do not depend directly on ReactPHP or HTTPlug.

Migration path: Start from the current Guzzle/Laravel HTTP usage and identify calls that genuinely benefit from non-blocking concurrency. Introduce the React adapter behind a feature-flagged client wrapper for those calls only. Preserve existing timeout, retry, logging, and metrics semantics at the wrapper boundary. If the package proves unsuitable, the wrapper allows reverting to Guzzle or another PSR-18 client without changing domain code.

Compatibility: Pin compatible versions of ReactPHP, HTTPlug, PSR-7 implementation, and PHP in Composer. Test against the Laravel versions actually supported by the product, plus PHP 8.1–8.3 as applicable. Avoid assuming Octane compatibility; validate separately if Octane is in use. Verify DNS, TLS, proxy, and connection-pool behavior in the target runtime, not just in unit tests.

Sequencing: First, run a dependency and compatibility spike in a throwaway branch. Second, build a small CLI proof of concept that exercises concurrency, timeout, cancellation, and error paths. Third, implement an application-owned client wrapper with configuration and observability. Fourth, add integration and load tests for the target worker model. Fifth, roll out behind a feature flag to one low-risk workload, then expand only if operational metrics are acceptable. Document the rollback path before production use.

Operational Impact

Maintenance: Treat the package as a low-activity community dependency. Assign internal ownership, monitor upstream releases and security advisories, and maintain a fork-or-replace contingency. Because the last release was in 2022, dependency upgrades may require patching or abandonment decisions rather than waiting for upstream fixes.

Support: There is no commercial support path. The team must be able to debug ReactPHP event-loop behavior, HTTPlug adapters, and PSR-7 request/response flows. Support burden is concentrated in the platform or backend team that owns the async worker, not in general Laravel application developers.

Scaling: ReactPHP can improve I/O concurrency and reduce per-request overhead in long-running workers, but scaling depends on worker count, event-loop concurrency limits, backpressure, and connection-pool sizing. CPU-bound work or blocking calls inside the loop will stall all concurrent operations. Plan horizontal worker scaling and explicit concurrency caps rather than assuming the adapter alone provides throughput gains.

Failure modes: Watch for unhandled promise rejections, event loops that never terminate, blocked loops from synchronous code, timeout mismatches between Laravel and ReactPHP, DNS/TLS failures, connection exhaustion, memory growth in long-running workers, duplicate retries on non-idempotent requests, and missing trace/log context across async boundaries. These failures can present as worker stalls rather than clean HTTP exceptions, so runbooks and health checks are required.

Ramp-up: Ramp-up is moderate to high for teams without ReactPHP experience. Developers need guidance on async control flow, cancellation, error propagation, and event-loop lifecycle. Start with one bounded workload, pair it with strong observability, and avoid exposing the adapter directly to broad application code until the operational model is proven.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib