Weave Code
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

Promises Laravel Package

guzzlehttp/promises

Iterative promise chaining for infinite async operations with Guzzle HTTP. Supports Promises/A+ compliance, coroutine-style await via Coroutine::of(), and synchronous wait() method. Cancel promises mid-execution and handle rejection/fulfillment callbacks cleanly. Works with any object with a then()...

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit: This package is a foundational async primitive for PHP applications, especially within the Guzzle ecosystem. It integrates seamlessly with Laravel's HTTP client (which depends on Guzzle), making it ideal for handling asynchronous HTTP requests and custom async workflows. Its Promises/A+ compliance ensures compatibility with standard async patterns.

Integration feasibility: High feasibility due to Composer-based installation and existing dependencies in Laravel. No additional configuration needed beyond requiring the package, as Guzzle automatically pulls it in. Direct usage requires minimal code changes for async operations.

Technical risk: Low risk. The package is mature (7720+ stars), MIT-licensed, and has clear version guidance. However, PHP version compatibility must be verified (v2.x requires >=7.2.5, <8.6). Potential risk if misusing synchronous wait in high-throughput scenarios without proper task queue management.

Key questions:

  • What PHP version is the application targeting?
  • Are there existing async workflows that would benefit from promise chaining?
  • How will task queue execution be managed in non-HTTP request contexts (e.g., CLI workers)?
  • Does the team have experience with promise-based async patterns?

Integration Approach

Stack fit: Ideal for Laravel applications using Guzzle for HTTP clients. Also suitable for custom async tasks where non-blocking operations are needed (e.g., parallel API calls). Fits into existing Laravel service containers without conflicts.

Migration path: If replacing another promise library (e.g., ReactPHP), interop is straightforward via then method compatibility. For new projects, simply require and use. Existing Guzzle-based code already uses this package, so no migration needed for HTTP operations.

Compatibility: Fully compatible with ReactPHP promises and other then-compatible libraries. Works with Laravel's event system when task queues are integrated. PHP 7.2.5+ required for latest version.

Sequencing:

  1. Ensure Guzzle is installed (via Laravel's framework dependencies).
  2. For custom async logic, create promises using new Promise() or FulfilledPromise/RejectedPromise.
  3. Chain operations with then(), handling resolution/rejection.
  4. In event loop contexts (e.g., ReactPHP), schedule task queue execution.

Operational Impact

Maintenance: Minimal overhead. Updates are handled via Guzzle dependency

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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4