mcg-web / promise-factory
This library tries to create a simple promise factory standard while waiting for a psr.
Installs: 177
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/mcg-web/promise-factory
Requires
- php: ^5.5|^7.0
Requires (Dev)
- phpunit/phpunit: ^4.1|^5.1
Suggests
- guzzlehttp/promises: To use Guzzle promise factory
- react/promise: To use ReactPhp promise factory
This package is auto-updated.
Last update: 2025-10-11 04:52:24 UTC
README
This library tries to create a simple promise factory standard while waiting for a psr. It Comes out of the box with factory for ReactPhp/Promise and Guzzle/Promises.
Getting Started
First, install PromiseFactory using composer.
composer require "mcg-web/promise-factory"
Optional to use Guzzle:
composer require "guzzlehttp/promises"
Optional to use ReactPhp:
composer require "react/promise"
Supported Factory
Guzzle: McGWeb\PromiseFactory\Factory\GuzzleHttpPromiseFactory
ReactPhp: McGWeb\PromiseFactory\Factory\ReactPromiseFactory
To use a custom Promise lib you can implement McGWeb\PromiseFactory\PromiseFactoryInterface
## License
McGWeb/PromiseFactory is released under the MIT license.