1
0
Fork 0

Missing parent constructor calls.

pull/4972/head
Niels Keurentjes 2016-02-27 22:39:03 +01:00
parent 823266407f
commit 868e607f17
6 changed files with 6 additions and 0 deletions

View File

@ -30,6 +30,7 @@ class ArtifactRepository extends ArrayRepository implements ConfigurableReposito
public function __construct(array $repoConfig, IOInterface $io)
{
parent::__construct();
if (!extension_loaded('zip')) {
throw new \RuntimeException('The artifact repository requires PHP\'s zip extension');
}

View File

@ -62,6 +62,7 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
public function __construct(array $repoConfig, IOInterface $io, Config $config, EventDispatcher $eventDispatcher = null, RemoteFilesystem $rfs = null)
{
parent::__construct();
if (!preg_match('{^[\w.]+\??://}', $repoConfig['url'])) {
// assume http as the default protocol
$repoConfig['url'] = 'http://'.$repoConfig['url'];

View File

@ -33,6 +33,7 @@ class FilesystemRepository extends WritableArrayRepository
*/
public function __construct(JsonFile $repositoryFile)
{
parent::__construct();
$this->file = $repositoryFile;
}

View File

@ -31,6 +31,7 @@ class PackageRepository extends ArrayRepository
*/
public function __construct(array $config)
{
parent::__construct();
$this->config = $config['package'];
// make sure we have an array of package definitions

View File

@ -49,6 +49,7 @@ class PearRepository extends ArrayRepository implements ConfigurableRepositoryIn
public function __construct(array $repoConfig, IOInterface $io, Config $config, EventDispatcher $dispatcher = null, RemoteFilesystem $rfs = null)
{
parent::__construct();
if (!preg_match('{^https?://}', $repoConfig['url'])) {
$repoConfig['url'] = 'http://'.$repoConfig['url'];
}

View File

@ -41,6 +41,7 @@ class VcsRepository extends ArrayRepository implements ConfigurableRepositoryInt
public function __construct(array $repoConfig, IOInterface $io, Config $config, EventDispatcher $dispatcher = null, array $drivers = null)
{
parent::__construct();
$this->drivers = $drivers ?: array(
'github' => 'Composer\Repository\Vcs\GitHubDriver',
'gitlab' => 'Composer\Repository\Vcs\GitLabDriver',