Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Commit 0561520

Browse files
committed
Clarified the usage example in the readme to import all expected symbols
1 parent 30073ad commit 0561520

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ composer require react-parallel/future-to-promise-converter
1818
# Usage
1919

2020
```php
21+
use parallel\Future;
22+
use parallel\Runtime;
2123
use React\EventLoop\Factory;
22-
use React\EventLoop\LoopInterface;
2324
use ReactParallel\FutureToPromiseConverter\FutureToPromiseConverter;
2425

2526
$loop = Factory::create();
@@ -34,7 +35,7 @@ $future = $runtime->run(function () {
3435
return 3;
3536
});
3637

37-
$converter->convert($future)->then(function ($value) {
38+
$converter->convert($future)->done(function ($value) {
3839
// $value will be 3 here
3940
});
4041
```

0 commit comments

Comments
 (0)