1
0
Fork 0

Fix react/promise usage for v2

pull/8566/head
Jordi Boggiano 2020-01-30 17:30:38 +01:00
parent 65dfb26c77
commit 38f6ae2c4e
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ use Composer\Semver\Constraint\EmptyConstraint;
use Composer\Util\Http\Response; use Composer\Util\Http\Response;
use Composer\Util\MetadataMinifier; use Composer\Util\MetadataMinifier;
use Composer\Util\Url; use Composer\Util\Url;
use React\Promise\Util as PromiseUtil; use React\Promise\Promise;
/** /**
* @author Jordi Boggiano <j.boggiano@seld.be> * @author Jordi Boggiano <j.boggiano@seld.be>
@ -1112,7 +1112,7 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
$retries = 3; $retries = 3;
if (isset($this->packagesNotFoundCache[$filename])) { if (isset($this->packagesNotFoundCache[$filename])) {
return PromiseUtil::promiseFor(array('packages' => array())); return new Promise(function ($resolve, $reject) { $resolve(array('packages' => array())); });
} }
$httpDownloader = $this->httpDownloader; $httpDownloader = $this->httpDownloader;