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

Buzz React Laravel Package

clue/buzz-react

Deprecated: migrated to react/http and kept for BC. Legacy async PSR-7 HTTP client for ReactPHP, promise-based, supports concurrent requests and streaming responses. Upgrade by switching namespaces to React\Http\Browser.

View on GitHub
Deep Wiki
Context7

[Deprecated] Simple, async PSR-7 HTTP client for concurrently processing any number of HTTP requests, built on top of ReactPHP.

Frequently asked questions about Buzz React
Can I use clue/buzz-react in a Laravel controller for API calls?
No, buzz-react is async and non-blocking, which conflicts with Laravel’s synchronous request lifecycle. Use it only for background tasks via Laravel Queues or CLI scripts. For controllers, stick with Guzzle or Symfony’s HTTP client.
How do I install buzz-react in a Laravel project?
Run `composer require clue/buzz-react`. Ensure your project uses ReactPHP (e.g., `react/event-loop`). Note: This package is deprecated, so test thoroughly for compatibility with your PHP/ReactPHP versions.
Does buzz-react support Laravel’s HTTP client middleware (e.g., retries, auth)?
Yes, buzz-react is PSR-7 compliant, so middleware like Symfony’s HttpClient or Guzzle middleware can be adapted. However, async middleware execution may require custom handling for shared state like cookies or tokens.
Will buzz-react work with Laravel 10 and PHP 8.2?
Unlikely without modifications. The last release was in 2020 and may break on PHP 8.1+. Test thoroughly or consider forking the package. Alternatives like Amp or Symfony’s HttpClient are actively maintained.
How do I handle timeouts and retries with buzz-react?
Use ReactPHP’s built-in timeout features or wrap requests in middleware. For retries, implement a custom retry loop with exponential backoff. Example: `$client->request($request)->then(...)->otherwise(function ($error) { retry(); })`.
Can I stream responses from buzz-react in Laravel?
Yes, buzz-react supports streaming responses via ReactPHP’s `onData` and `onEnd` callbacks. For Laravel, stream the response directly to a file or output buffer, but avoid mixing with synchronous Blade templates.
What’s the best way to integrate buzz-react with Laravel Queues?
Create a custom queue worker that initializes ReactPHP’s event loop. Dispatch async tasks via `AsyncHttpTask::dispatch()` and process them in a React-powered worker. Example: `php artisan queue:work --queue=async-http --daemon`.
Are there alternatives to buzz-react for async HTTP in Laravel?
Yes. For Laravel, consider Symfony’s HttpClient (async via ReactPHP), Amp’s HTTP client, or Guzzle’s async plugins. If you need Swoole integration, use Swoole’s coroutines or RoadRunner’s async workers.
How do I test buzz-react in PHPUnit?
Mock ReactPHP’s event loop or use async-aware testing tools like `php-react/promise`. Example: `$this->expectException(TimeoutException::class);` for timeout tests. Avoid relying on global state in async tests.
What are the production risks of using buzz-react in Laravel?
Key risks include: debugging async stack traces, lack of observability (no built-in metrics), and potential conflicts with Laravel’s synchronous components. Monitor for race conditions in shared state (e.g., auth tokens) and plan for eventual migration.
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.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo