1
0
Fork 0

Add more type info

pull/10086/head
Jordi Boggiano 2021-08-30 17:45:35 +02:00
parent 0761474599
commit 01d734125c
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
27 changed files with 206 additions and 57 deletions

View File

@ -26,6 +26,7 @@ use Composer\DependencyResolver\Operation\UninstallOperation;
*/ */
class MetapackageInstaller implements InstallerInterface class MetapackageInstaller implements InstallerInterface
{ {
/** @var IOInterface */
private $io; private $io;
public function __construct(IOInterface $io) public function __construct(IOInterface $io)

View File

@ -25,8 +25,11 @@ use Composer\Util\Filesystem;
*/ */
class ProjectInstaller implements InstallerInterface class ProjectInstaller implements InstallerInterface
{ {
/** @var string */
private $installPath; private $installPath;
/** @var DownloadManager */
private $downloadManager; private $downloadManager;
/** @var Filesystem */
private $filesystem; private $filesystem;
public function __construct($installPath, DownloadManager $dm, Filesystem $fs) public function __construct($installPath, DownloadManager $dm, Filesystem $fs)

View File

@ -29,7 +29,7 @@ class SuggestedPackagesReporter
const MODE_BY_SUGGESTION = 4; const MODE_BY_SUGGESTION = 4;
/** /**
* @var array * @var array<array{source: string, target: string, reason: string}>
*/ */
protected $suggestedPackages = array(); protected $suggestedPackages = array();

View File

@ -30,7 +30,7 @@ class StabilityFilter
* @param string $stability one of 'stable', 'RC', 'beta', 'alpha' or 'dev' * @param string $stability one of 'stable', 'RC', 'beta', 'alpha' or 'dev'
* @return bool true if any package name is acceptable * @return bool true if any package name is acceptable
*/ */
public static function isPackageAcceptable(array $acceptableStabilities, array $stabilityFlags, $names, $stability) public static function isPackageAcceptable(array $acceptableStabilities, array $stabilityFlags, array $names, $stability)
{ {
foreach ($names as $name) { foreach ($names as $name) {
// allow if package matches the package-specific stability flag // allow if package matches the package-specific stability flag

View File

@ -18,11 +18,14 @@ use Symfony\Component\Process\ExecutableFinder;
class HhvmDetector class HhvmDetector
{ {
private static $hhvmVersion; /** @var string|false|null */
private static $hhvmVersion = null;
/** @var ?ExecutableFinder */
private $executableFinder; private $executableFinder;
/** @var ?ProcessExecutor */
private $processExecutor; private $processExecutor;
public function __construct(ExecutableFinder $executableFinder = null, ProcessExecutor $processExecutor = null) public function __construct(ExecutableFinder $executableFinder = null, ProcessExecutor $processExecutor = null)
{ {
$this->executableFinder = $executableFinder; $this->executableFinder = $executableFinder;
$this->processExecutor = $processExecutor; $this->processExecutor = $processExecutor;

View File

@ -25,7 +25,7 @@ class Runtime
} }
/** /**
* @param bool $constant * @param string $constant
* @param class-string $class * @param class-string $class
* @return mixed * @return mixed
*/ */

View File

@ -48,7 +48,7 @@ class PreFileDownloadEvent extends Event
private $context; private $context;
/** /**
* @var array * @var mixed[]
*/ */
private $transportOptions = array(); private $transportOptions = array();

View File

@ -16,6 +16,7 @@ use Composer\EventDispatcher\Event;
use Composer\Repository\RepositoryInterface; use Composer\Repository\RepositoryInterface;
use Composer\DependencyResolver\Request; use Composer\DependencyResolver\Request;
use Composer\Package\PackageInterface; use Composer\Package\PackageInterface;
use Composer\Package\BasePackage;
/** /**
* The pre command run event. * The pre command run event.
@ -33,19 +34,23 @@ class PrePoolCreateEvent extends Event
*/ */
private $request; private $request;
/** /**
* @var array * @var int[] array of stability => BasePackage::STABILITY_* value
* @phpstan-var array<string, BasePackage::STABILITY_*>
*/ */
private $acceptableStabilities; private $acceptableStabilities;
/** /**
* @var array * @var int[] array of package name => BasePackage::STABILITY_* value
* @phpstan-var array<string, BasePackage::STABILITY_*>
*/ */
private $stabilityFlags; private $stabilityFlags;
/** /**
* @var array * @var array[] of package => version => [alias, alias_normalized]
* @phpstan-var array<string, array<string, array{alias: string, alias_normalized: string}>>
*/ */
private $rootAliases; private $rootAliases;
/** /**
* @var array * @var string[]
* @phpstan-var array<string, string>
*/ */
private $rootReferences; private $rootReferences;
/** /**
@ -58,8 +63,17 @@ class PrePoolCreateEvent extends Event
private $unacceptableFixedPackages; private $unacceptableFixedPackages;
/** /**
* @param string $name The event name * @param string $name The event name
* @param RepositoryInterface[] $repositories * @param RepositoryInterface[] $repositories
* @param int[] $acceptableStabilities array of stability => BasePackage::STABILITY_* value
* @param int[] $stabilityFlags array of package name => BasePackage::STABILITY_* value
* @param array[] $rootAliases array of package => version => [alias, alias_normalized]
* @param string[] $rootReferences
*
* @phpstan-param array<string, BasePackage::STABILITY_*> $acceptableStabilities
* @phpstan-param array<string, BasePackage::STABILITY_*> $stabilityFlags
* @phpstan-param array<string, array<string, array{alias: string, alias_normalized: string}>> $rootAliases
* @phpstan-param array<string, string> $rootReferences
*/ */
public function __construct($name, array $repositories, Request $request, array $acceptableStabilities, array $stabilityFlags, array $rootAliases, array $rootReferences, array $packages, array $unacceptableFixedPackages) public function __construct($name, array $repositories, Request $request, array $acceptableStabilities, array $stabilityFlags, array $rootAliases, array $rootReferences, array $packages, array $unacceptableFixedPackages)
{ {
@ -92,7 +106,8 @@ class PrePoolCreateEvent extends Event
} }
/** /**
* @return array * @return int[] array of stability => BasePackage::STABILITY_* value
* @phpstan-return array<string, BasePackage::STABILITY_*>
*/ */
public function getAcceptableStabilities() public function getAcceptableStabilities()
{ {
@ -100,7 +115,8 @@ class PrePoolCreateEvent extends Event
} }
/** /**
* @return array * @return int[] array of package name => BasePackage::STABILITY_* value
* @phpstan-return array<string, BasePackage::STABILITY_*>
*/ */
public function getStabilityFlags() public function getStabilityFlags()
{ {
@ -117,7 +133,8 @@ class PrePoolCreateEvent extends Event
} }
/** /**
* @return array * @return string[]
* @phpstan-return array<string, string>
*/ */
public function getRootReferences() public function getRootReferences()
{ {

View File

@ -27,8 +27,11 @@ class ArtifactRepository extends ArrayRepository implements ConfigurableReposito
/** @var LoaderInterface */ /** @var LoaderInterface */
protected $loader; protected $loader;
/** @var string */
protected $lookup; protected $lookup;
/** @var mixed[] */
protected $repoConfig; protected $repoConfig;
/** @var IOInterface */
private $io; private $io;
public function __construct(array $repoConfig, IOInterface $io) public function __construct(array $repoConfig, IOInterface $io)

View File

@ -44,43 +44,72 @@ use Composer\Util\Url;
*/ */
class ComposerRepository extends ArrayRepository implements ConfigurableRepositoryInterface class ComposerRepository extends ArrayRepository implements ConfigurableRepositoryInterface
{ {
/**
* @var mixed[]
* @phpstan-var array{url: string, options?: mixed[], type?: 'composer', allow_ssl_downgrade?: bool}
*/
private $repoConfig; private $repoConfig;
/** @var mixed[] */
private $options; private $options;
/** @var string */
private $url; private $url;
/** @var string */
private $baseUrl; private $baseUrl;
/** @var IOInterface */
private $io; private $io;
/** @var HttpDownloader */ /** @var HttpDownloader */
private $httpDownloader; private $httpDownloader;
/** @var Loop */
private $loop; private $loop;
/** @var Cache */
protected $cache; protected $cache;
protected $notifyUrl; /** @var ?string */
protected $searchUrl; protected $notifyUrl = null;
/** @var string|null a URL containing %package% which can be queried to get providers of a given name */ /** @var ?string */
protected $providersApiUrl; protected $searchUrl = null;
/** @var ?string a URL containing %package% which can be queried to get providers of a given name */
protected $providersApiUrl = null;
/** @var bool */
protected $hasProviders = false; protected $hasProviders = false;
protected $providersUrl; /** @var ?string */
protected $listUrl; protected $providersUrl = null;
/** @var ?string */
protected $listUrl = null;
/** @var bool Indicates whether a comprehensive list of packages this repository might provide is expressed in the repository root. **/ /** @var bool Indicates whether a comprehensive list of packages this repository might provide is expressed in the repository root. **/
protected $hasAvailablePackageList = false; protected $hasAvailablePackageList = false;
protected $availablePackages; /** @var ?array<string> */
protected $availablePackagePatterns; protected $availablePackages = null;
protected $lazyProvidersUrl; /** @var ?array<string> */
protected $availablePackagePatterns = null;
/** @var ?string */
protected $lazyProvidersUrl = null;
/** @var ?array<string, array{sha256: string}> */
protected $providerListing; protected $providerListing;
/** @var ArrayLoader */
protected $loader; protected $loader;
/** @var bool */
private $allowSslDowngrade = false; private $allowSslDowngrade = false;
/** @var ?EventDispatcher */
private $eventDispatcher; private $eventDispatcher;
/** @var ?array<string, array{url: string, preferred: bool}> */
private $sourceMirrors; private $sourceMirrors;
/** @var ?array<string, array{url: string, preferred: bool}> */
private $distMirrors; private $distMirrors;
/** @var bool */
private $degradedMode = false; private $degradedMode = false;
/** @var mixed[]|true */
private $rootData; private $rootData;
private $hasPartialPackages; /** @var bool */
private $partialPackagesByName; private $hasPartialPackages = false;
/** @var ?array<string, PackageInterface> */
private $partialPackagesByName = null;
/** /**
* TODO v3 should make this private once we can drop PHP 5.3 support * TODO v3 should make this private once we can drop PHP 5.3 support
* @private * @private
* @var array list of package names which are fresh and can be loaded from the cache directly in case loadPackage is called several times * @var array list of package names which are fresh and can be loaded from the cache directly in case loadPackage is called several times
* useful for v2 metadata repositories with lazy providers * useful for v2 metadata repositories with lazy providers
* @phpstan-var array<string, true>
*/ */
public $freshMetadataUrls = array(); public $freshMetadataUrls = array();
@ -89,11 +118,13 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
* @private * @private
* @var array list of package names which returned a 404 and should not be re-fetched in case loadPackage is called several times * @var array list of package names which returned a 404 and should not be re-fetched in case loadPackage is called several times
* useful for v2 metadata repositories with lazy providers * useful for v2 metadata repositories with lazy providers
* @phpstan-var array<string, true>
*/ */
public $packagesNotFoundCache = array(); public $packagesNotFoundCache = array();
/** /**
* TODO v3 should make this private once we can drop PHP 5.3 support * TODO v3 should make this private once we can drop PHP 5.3 support
* @private * @private
* @var VersionParser
*/ */
public $versionParser; public $versionParser;

View File

@ -23,13 +23,13 @@ class CompositeRepository implements RepositoryInterface
{ {
/** /**
* List of repositories * List of repositories
* @var array * @var RepositoryInterface[]
*/ */
private $repositories; private $repositories;
/** /**
* Constructor * Constructor
* @param array $repositories * @param RepositoryInterface[] $repositories
*/ */
public function __construct(array $repositories) public function __construct(array $repositories)
{ {
@ -169,8 +169,9 @@ class CompositeRepository implements RepositoryInterface
public function removePackage(PackageInterface $package) public function removePackage(PackageInterface $package)
{ {
foreach ($this->repositories as $repository) { foreach ($this->repositories as $repository) {
/* @var $repository RepositoryInterface */ if ($repository instanceof WritableRepositoryInterface) {
$repository->removePackage($package); $repository->removePackage($package);
}
} }
} }

View File

@ -28,9 +28,13 @@ use Composer\Util\Filesystem;
*/ */
class FilesystemRepository extends WritableArrayRepository class FilesystemRepository extends WritableArrayRepository
{ {
/** @var JsonFile */
protected $file; protected $file;
/** @var bool */
private $dumpVersions; private $dumpVersions;
/** @var ?RootPackageInterface */
private $rootPackage; private $rootPackage;
/** @var Filesystem */
private $filesystem; private $filesystem;
/** /**

View File

@ -22,9 +22,13 @@ use Composer\Package\BasePackage;
*/ */
class FilterRepository implements RepositoryInterface class FilterRepository implements RepositoryInterface
{ {
private $only = array(); /** @var ?string */
private $exclude = array(); private $only = null;
/** @var ?string */
private $exclude = null;
/** @var bool */
private $canonical = true; private $canonical = true;
/** @var RepositoryInterface */
private $repo; private $repo;
public function __construct(RepositoryInterface $repo, array $options) public function __construct(RepositoryInterface $repo, array $options)
@ -174,14 +178,6 @@ class FilterRepository implements RepositoryInterface
return $result; return $result;
} }
/**
* {@inheritdoc}
*/
public function removePackage(PackageInterface $package)
{
return $this->repo->removePackage($package);
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */

View File

@ -22,6 +22,7 @@ use Composer\Package\Loader\ValidatingArrayLoader;
*/ */
class PackageRepository extends ArrayRepository class PackageRepository extends ArrayRepository
{ {
/** @var mixed[] */
private $config; private $config;
/** /**

View File

@ -77,7 +77,8 @@ class PathRepository extends ArrayRepository implements ConfigurableRepositoryIn
private $url; private $url;
/** /**
* @var array * @var mixed[]
* @phpstan-var array{url: string, options?: array{symlink?: bool, relative?: bool, versions?: array<string, string>}}
*/ */
private $repoConfig; private $repoConfig;
@ -87,7 +88,7 @@ class PathRepository extends ArrayRepository implements ConfigurableRepositoryIn
private $process; private $process;
/** /**
* @var array * @var array{symlink?: bool, relative?: bool, versions?: array<string, string>}
*/ */
private $options; private $options;

View File

@ -46,13 +46,15 @@ class PlatformRepository extends ArrayRepository
/** /**
* Defines overrides so that the platform can be mocked * Defines overrides so that the platform can be mocked
* *
* Should be an array of package name => version number mappings * Keyed by package name (lowercased)
* *
* @var array * @var array<string, array{name: string, version: string}>
*/ */
private $overrides = array(); private $overrides = array();
/** @var Runtime */
private $runtime; private $runtime;
/** @var HhvmDetector */
private $hhvmDetector; private $hhvmDetector;
public function __construct(array $packages = array(), array $overrides = array(), Runtime $runtime = null, HhvmDetector $hhvmDetector = null) public function __construct(array $packages = array(), array $overrides = array(), Runtime $runtime = null, HhvmDetector $hhvmDetector = null)

View File

@ -67,6 +67,10 @@ class RepositorySet
*/ */
private $stabilityFlags; private $stabilityFlags;
/**
* @var ConstraintInterface[]
* @phpstan-var array<string, ConstraintInterface>
*/
private $rootRequires; private $rootRequires;
/** @var bool */ /** @var bool */
@ -86,6 +90,8 @@ class RepositorySet
* @phpstan-param list<array{package: string, version: string, alias: string, alias_normalized: string}> $rootAliases * @phpstan-param list<array{package: string, version: string, alias: string, alias_normalized: string}> $rootAliases
* @param string[] $rootReferences an array of package name => source reference * @param string[] $rootReferences an array of package name => source reference
* @phpstan-param array<string, string> $rootReferences * @phpstan-param array<string, string> $rootReferences
* @param ConstraintInterface[] $rootRequires an array of package name => constraint from the root package
* @phpstan-param array<string, ConstraintInterface> $rootRequires
*/ */
public function __construct($minimumStability = 'stable', array $stabilityFlags = array(), array $rootAliases = array(), array $rootReferences = array(), array $rootRequires = array()) public function __construct($minimumStability = 'stable', array $stabilityFlags = array(), array $rootAliases = array(), array $rootReferences = array(), array $rootRequires = array())
{ {
@ -112,6 +118,10 @@ class RepositorySet
$this->allowInstalledRepositories = $allow; $this->allowInstalledRepositories = $allow;
} }
/**
* @return ConstraintInterface[] an array of package name => constraint from the root package, platform requirements excluded
* @phpstan-return array<string, ConstraintInterface>
*/
public function getRootRequires() public function getRootRequires()
{ {
return $this->rootRequires; return $this->rootRequires;
@ -193,6 +203,12 @@ class RepositorySet
return $result; return $result;
} }
/**
* @param string $packageName
*
* @return array[] an array with the provider name as key and value of array('name' => '...', 'description' => '...', 'type' => '...')
* @phpstan-return array<string, array{name: string, description: string, type: string}>
*/
public function getProviders($packageName) public function getProviders($packageName)
{ {
$providers = array(); $providers = array();
@ -205,6 +221,13 @@ class RepositorySet
return $providers; return $providers;
} }
/**
* Check for each given package name whether it would be accepted by this RepositorySet in the given $stability
*
* @param string[] $names
* @param string $stability one of 'stable', 'RC', 'beta', 'alpha' or 'dev'
* @return bool
*/
public function isPackageAcceptable($names, $stability) public function isPackageAcceptable($names, $stability)
{ {
return StabilityFilter::isPackageAcceptable($this->acceptableStabilities, $this->stabilityFlags, $names, $stability); return StabilityFilter::isPackageAcceptable($this->acceptableStabilities, $this->stabilityFlags, $names, $stability);

View File

@ -20,16 +20,27 @@ use Composer\Util\Http\Response;
abstract class BitbucketDriver extends VcsDriver abstract class BitbucketDriver extends VcsDriver
{ {
/** @var string */
protected $owner; protected $owner;
/** @var string */
protected $repository; protected $repository;
protected $hasIssues; /** @var bool */
protected $hasIssues = false;
/** @var ?string */
protected $rootIdentifier; protected $rootIdentifier;
/** @var array<string, string> Map of tag name to identifier */
protected $tags; protected $tags;
/** @var array<string, string> Map of branch name to identifier */
protected $branches; protected $branches;
/** @var string */
protected $branchesUrl = ''; protected $branchesUrl = '';
/** @var string */
protected $tagsUrl = ''; protected $tagsUrl = '';
/** @var string */
protected $homeUrl = ''; protected $homeUrl = '';
/** @var string */
protected $website = ''; protected $website = '';
/** @var string */
protected $cloneHttpsUrl = ''; protected $cloneHttpsUrl = '';
/** /**

View File

@ -23,10 +23,15 @@ use Composer\IO\IOInterface;
*/ */
class FossilDriver extends VcsDriver class FossilDriver extends VcsDriver
{ {
/** @var array<string, string> Map of tag name to identifier */
protected $tags; protected $tags;
/** @var array<string, string> Map of branch name to identifier */
protected $branches; protected $branches;
protected $rootIdentifier; /** @var ?string */
protected $repoFile; protected $rootIdentifier = null;
/** @var ?string */
protected $repoFile = null;
/** @var string */
protected $checkoutDir; protected $checkoutDir;
/** /**

View File

@ -25,9 +25,13 @@ use Composer\Config;
*/ */
class GitDriver extends VcsDriver class GitDriver extends VcsDriver
{ {
/** @var array<string, string> Map of tag name to identifier */
protected $tags; protected $tags;
/** @var array<string, string> Map of branch name to identifier */
protected $branches; protected $branches;
/** @var string */
protected $rootIdentifier; protected $rootIdentifier;
/** @var string */
protected $repoDir; protected $repoDir;
/** /**

View File

@ -25,15 +25,25 @@ use Composer\Util\Http\Response;
*/ */
class GitHubDriver extends VcsDriver class GitHubDriver extends VcsDriver
{ {
/** @var string */
protected $owner; protected $owner;
/** @var string */
protected $repository; protected $repository;
/** @var array<string, string> Map of tag name to identifier */
protected $tags; protected $tags;
/** @var array<string, string> Map of branch name to identifier */
protected $branches; protected $branches;
/** @var string */
protected $rootIdentifier; protected $rootIdentifier;
/** @var mixed[] */
protected $repoData; protected $repoData;
protected $hasIssues; /** @var bool */
protected $hasIssues = false;
/** @var bool */
protected $isPrivate = false; protected $isPrivate = false;
/** @var bool */
private $isArchived = false; private $isArchived = false;
/** @var array<int, array{type: string, url: string}>|false|null */
private $fundingInfo; private $fundingInfo;
/** /**

View File

@ -29,28 +29,30 @@ use Composer\Util\Http\Response;
*/ */
class GitLabDriver extends VcsDriver class GitLabDriver extends VcsDriver
{ {
/**
* @var string
* @phpstan-var 'https'|'http'
*/
private $scheme; private $scheme;
/** @var string */
private $namespace; private $namespace;
/** @var string */
private $repository; private $repository;
/** /**
* @var array Project data returned by GitLab API * @var mixed[] Project data returned by GitLab API
*/ */
private $project; private $project;
/** /**
* @var array Keeps commits returned by GitLab API * @var array<string, mixed[]> Keeps commits returned by GitLab API
*/ */
private $commits = array(); private $commits = array();
/** /** @var array<string, string> Map of tag name to identifier */
* @var array List of tag => reference
*/
private $tags; private $tags;
/** /** @var array<string, string> Map of branch name to identifier */
* @var array List of branch => reference
*/
private $branches; private $branches;
/** /**

View File

@ -24,9 +24,13 @@ use Composer\IO\IOInterface;
*/ */
class HgDriver extends VcsDriver class HgDriver extends VcsDriver
{ {
/** @var array<string, string> Map of tag name to identifier */
protected $tags; protected $tags;
/** @var array<string, string> Map of branch name to identifier */
protected $branches; protected $branches;
/** @var string */
protected $rootIdentifier; protected $rootIdentifier;
/** @var string */
protected $repoDir; protected $repoDir;
/** /**

View File

@ -23,7 +23,9 @@ use Composer\Util\Perforce;
*/ */
class PerforceDriver extends VcsDriver class PerforceDriver extends VcsDriver
{ {
/** @var string */
protected $depot; protected $depot;
/** @var string */
protected $branch; protected $branch;
/** @var ?Perforce */ /** @var ?Perforce */
protected $perforce = null; protected $perforce = null;

View File

@ -28,15 +28,24 @@ use Composer\Downloader\TransportException;
*/ */
class SvnDriver extends VcsDriver class SvnDriver extends VcsDriver
{ {
/** @var string */
protected $baseUrl; protected $baseUrl;
/** @var array<string, string> Map of tag name to identifier */
protected $tags; protected $tags;
/** @var array<string, string> Map of branch name to identifier */
protected $branches; protected $branches;
/** @var ?string */
protected $rootIdentifier; protected $rootIdentifier;
/** @var string|false */
protected $trunkPath = 'trunk'; protected $trunkPath = 'trunk';
/** @var string */
protected $branchesPath = 'branches'; protected $branchesPath = 'branches';
/** @var string */
protected $tagsPath = 'tags'; protected $tagsPath = 'tags';
/** @var string */
protected $packagePath = ''; protected $packagePath = '';
/** @var bool */
protected $cacheCredentials = true; protected $cacheCredentials = true;
/** /**

View File

@ -33,7 +33,7 @@ abstract class VcsDriver implements VcsDriverInterface
protected $url; protected $url;
/** @var string */ /** @var string */
protected $originUrl; protected $originUrl;
/** @var array */ /** @var array<string, mixed> */
protected $repoConfig; protected $repoConfig;
/** @var IOInterface */ /** @var IOInterface */
protected $io; protected $io;
@ -43,7 +43,7 @@ abstract class VcsDriver implements VcsDriverInterface
protected $process; protected $process;
/** @var HttpDownloader */ /** @var HttpDownloader */
protected $httpDownloader; protected $httpDownloader;
/** @var array */ /** @var array<string, mixed> */
protected $infoCache = array(); protected $infoCache = array();
/** @var ?Cache */ /** @var ?Cache */
protected $cache; protected $cache;

View File

@ -32,25 +32,41 @@ use Composer\Config;
*/ */
class VcsRepository extends ArrayRepository implements ConfigurableRepositoryInterface class VcsRepository extends ArrayRepository implements ConfigurableRepositoryInterface
{ {
/** @var string */
protected $url; protected $url;
/** @var ?string */
protected $packageName; protected $packageName;
/** @var bool */
protected $isVerbose; protected $isVerbose;
/** @var bool */
protected $isVeryVerbose; protected $isVeryVerbose;
/** @var IOInterface */
protected $io; protected $io;
/** @var Config */
protected $config; protected $config;
/** @var VersionParser */
protected $versionParser; protected $versionParser;
/** @var string */
protected $type; protected $type;
/** @var ?LoaderInterface */
protected $loader; protected $loader;
/** @var array<string, mixed> */
protected $repoConfig; protected $repoConfig;
/** @var HttpDownloader */
protected $httpDownloader; protected $httpDownloader;
/** @var ProcessExecutor */
protected $processExecutor; protected $processExecutor;
/** @var bool */
protected $branchErrorOccurred = false; protected $branchErrorOccurred = false;
/** @var array<string, class-string> */
private $drivers; private $drivers;
/** @var ?VcsDriverInterface */ /** @var ?VcsDriverInterface */
private $driver; private $driver;
/** @var ?VersionCacheInterface */ /** @var ?VersionCacheInterface */
private $versionCache; private $versionCache;
/** @var string[] */
private $emptyReferences = array(); private $emptyReferences = array();
/** @var array<'tags'|'branches', array<string, \Throwable>> */
private $versionTransportExceptions = array(); private $versionTransportExceptions = array();
public function __construct(array $repoConfig, IOInterface $io, Config $config, HttpDownloader $httpDownloader, EventDispatcher $dispatcher = null, ProcessExecutor $process = null, array $drivers = null, VersionCacheInterface $versionCache = null) public function __construct(array $repoConfig, IOInterface $io, Config $config, HttpDownloader $httpDownloader, EventDispatcher $dispatcher = null, ProcessExecutor $process = null, array $drivers = null, VersionCacheInterface $versionCache = null)