Registry / async / react-promise

react-promise

JSON →
library3.3.0phppackagistunverified

A lightweight implementation of CommonJS Promises/A for PHP.

composer require react/promise
INSTALL
IMPORT
SIG · REACT-PROMISE
R
react-promise
asyncphpv3.3.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Promise
use React\Promise\Promise;

Create and resolve a promise.

use React\Promise\Promise; $promise = new Promise(function (callable $resolve, callable $reject) { $resolve('Hello World!'); }); $promise->then(function ($value) { echo $value; });
Debug
Known issues
breakingReact Promise v3 uses a different API than v2; the constructor now expects a resolver function.
fix
Update code to use the new resolver pattern: new Promise(function($resolve, $reject) { ... }).
affects: >=3.0.0
Upgrade
Version history
3.3.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
21 hits · last 30 days
node
18
Amazon
1
Resources
react-promise — pip install react-promise · libregistry