Browse Source

Fix missing use/undefined var

Jordi Boggiano 5 years ago
parent
commit
607b487295

+ 1 - 1
src/Composer/Downloader/GitDownloader.php

@@ -134,7 +134,7 @@ class GitDownloader extends VcsDownloader implements DvcsDownloaderInterface
             $msg = "Checking out ".$this->getShortHash($ref);
             $msg = "Checking out ".$this->getShortHash($ref);
             $command = 'git remote set-url composer %url% && git rev-parse --quiet --verify %ref% || (git fetch composer && git fetch --tags composer)';
             $command = 'git remote set-url composer %url% && git rev-parse --quiet --verify %ref% || (git fetch composer && git fetch --tags composer)';
             if (getenv('COMPOSER_DISABLE_NETWORK')) {
             if (getenv('COMPOSER_DISABLE_NETWORK')) {
-                throw new \RuntimeException('The required git reference for '.$package->getName().' is not in cache and network is disabled, aborting');
+                throw new \RuntimeException('The required git reference for '.$target->getName().' is not in cache and network is disabled, aborting');
             }
             }
         }
         }
 
 

+ 1 - 0
src/Composer/Downloader/VcsDownloader.php

@@ -20,6 +20,7 @@ use Composer\Package\Version\VersionParser;
 use Composer\Util\ProcessExecutor;
 use Composer\Util\ProcessExecutor;
 use Composer\IO\IOInterface;
 use Composer\IO\IOInterface;
 use Composer\Util\Filesystem;
 use Composer\Util\Filesystem;
+use React\Promise\PromiseInterface;
 
 
 /**
 /**
  * @author Jordi Boggiano <j.boggiano@seld.be>
  * @author Jordi Boggiano <j.boggiano@seld.be>