|
@@ -38,6 +38,7 @@ class VcsRepository extends ArrayRepository implements ConfigurableRepositoryInt
|
|
|
protected $loader;
|
|
|
protected $repoConfig;
|
|
|
protected $branchErrorOccurred = false;
|
|
|
+ private $drivers;
|
|
|
|
|
|
public function __construct(array $repoConfig, IOInterface $io, Config $config, EventDispatcher $dispatcher = null, array $drivers = null)
|
|
|
{
|
|
@@ -77,6 +78,7 @@ class VcsRepository extends ArrayRepository implements ConfigurableRepositoryInt
|
|
|
if (isset($this->drivers[$this->type])) {
|
|
|
$class = $this->drivers[$this->type];
|
|
|
$driver = new $class($this->repoConfig, $this->io, $this->config);
|
|
|
+ /** @var VcsDriverInterface $driver */
|
|
|
$driver->initialize();
|
|
|
|
|
|
return $driver;
|
|
@@ -85,6 +87,7 @@ class VcsRepository extends ArrayRepository implements ConfigurableRepositoryInt
|
|
|
foreach ($this->drivers as $driver) {
|
|
|
if ($driver::supports($this->io, $this->config, $this->url)) {
|
|
|
$driver = new $driver($this->repoConfig, $this->io, $this->config);
|
|
|
+ /** @var VcsDriverInterface $driver */
|
|
|
$driver->initialize();
|
|
|
|
|
|
return $driver;
|
|
@@ -94,6 +97,7 @@ class VcsRepository extends ArrayRepository implements ConfigurableRepositoryInt
|
|
|
foreach ($this->drivers as $driver) {
|
|
|
if ($driver::supports($this->io, $this->config, $this->url, true)) {
|
|
|
$driver = new $driver($this->repoConfig, $this->io, $this->config);
|
|
|
+ /** @var VcsDriverInterface $driver */
|
|
|
$driver->initialize();
|
|
|
|
|
|
return $driver;
|