Composer API
Class

Composer\Util\GitLab

class GitLab

Methods

__construct(IOInterface $io, Config $config, ProcessExecutor $process = null, RemoteFilesystem $remoteFilesystem = null)

Constructor.

bool authorizeOAuth(string $originUrl)

Attempts to authorize a GitLab domain via OAuth.

bool authorizeOAuthInteractively(string $scheme, string $originUrl, string $message = null)

Authorizes a GitLab domain interactively via OAuth.

Details

at line 39
public __construct(IOInterface $io, Config $config, ProcessExecutor $process = null, RemoteFilesystem $remoteFilesystem = null)

Constructor.

Parameters

IOInterface $io The IO instance
Config $config The composer configuration
ProcessExecutor $process Process instance, injectable for mocking
RemoteFilesystem $remoteFilesystem Remote Filesystem, injectable for mocking

at line 54
public bool authorizeOAuth(string $originUrl)

Attempts to authorize a GitLab domain via OAuth.

Parameters

string $originUrl The host this GitLab instance is located at

Return Value

bool true on success

at line 91
public bool authorizeOAuthInteractively(string $scheme, string $originUrl, string $message = null)

Authorizes a GitLab domain interactively via OAuth.

Parameters

string $scheme Scheme used in the origin URL
string $originUrl The host this GitLab instance is located at
string $message The reason this authorization is required

Return Value

bool true on success

Exceptions

RuntimeException
Exception