1515
1616namespace Drift \CommandBus \Async ;
1717
18+ use function Clue \React \Block \await ;
1819use Drift \CommandBus \Bus \CommandBus ;
1920use Drift \CommandBus \Console \CommandBusLineMessage ;
2021use Drift \CommandBus \Exception \InvalidCommandException ;
2122use Drift \Console \OutputPrinter ;
22- use function Clue \React \Block \await ;
2323use React \EventLoop \LoopInterface ;
24- use React \Promise \FulfilledPromise ;
2524use React \Promise \PromiseInterface ;
25+ use function React \Promise \resolve ;
2626
2727/**
2828 * Class DummyAdapter.
@@ -61,7 +61,7 @@ public function createInfrastructure(OutputPrinter $outputPrinter): PromiseInter
6161 $ this ->queue = [];
6262 (new CommandBusLineMessage ('Local queue created properly ' ))->print ($ outputPrinter );
6363
64- return new FulfilledPromise ();
64+ return resolve ();
6565 }
6666
6767 /**
@@ -76,7 +76,7 @@ public function dropInfrastructure(OutputPrinter $outputPrinter): PromiseInterfa
7676 $ this ->queue = null ;
7777 (new CommandBusLineMessage ('Local queue dropped properly ' ))->print ($ outputPrinter );
7878
79- return new FulfilledPromise ();
79+ return resolve ();
8080 }
8181
8282 /**
@@ -92,7 +92,7 @@ public function checkInfrastructure(OutputPrinter $outputPrinter): PromiseInterf
9292 ? (new CommandBusLineMessage ('Local queue exists ' ))->print ($ outputPrinter )
9393 : (new CommandBusLineMessage ('Local queue does not exist ' ))->print ($ outputPrinter );
9494
95- return new FulfilledPromise ();
95+ return resolve ();
9696 }
9797
9898 /**
@@ -120,7 +120,7 @@ public function enqueue($command): PromiseInterface
120120 {
121121 $ this ->queue [] = $ command ;
122122
123- return new FulfilledPromise ();
123+ return resolve ();
124124 }
125125
126126 /**
0 commit comments