Constants

MAX_QTY_AUTH_TRIES

MAX_QTY_AUTH_TRIES = 5

Properties

$credentials

$credentials : array

Type

array

$hasAuth

$hasAuth : boolean

Type

boolean

$url

$url : string

Type

string

$cacheCredentials

$cacheCredentials : boolean

Type

boolean

$qtyAuthTries

$qtyAuthTries : integer

Type

integer

$version

$version : string|null

Type

string|null

Methods

cleanEnv()

cleanEnv() 

execute()

execute(string  $command, string  $url, string  $cwd = null, string  $path = null, boolean  $verbose = false) : string

Execute an SVN remote command and try to fix up the process with credentials if necessary.

Parameters

string $command

SVN command to run

string $url

SVN url

string $cwd

Working directory

string $path

Target for a checkout

boolean $verbose

Output all output to the user

Throws

\RuntimeException

Returns

string

executeLocal()

executeLocal(string  $command, string  $path, string  $cwd = null, boolean  $verbose = false) : string

Execute an SVN local command and try to fix up the process with credentials if necessary.

Parameters

string $command

SVN command to run

string $path

Path argument passed thru to the command

string $cwd

Working directory

boolean $verbose

Output all output to the user

Throws

\RuntimeException

Returns

string

setCacheCredentials()

setCacheCredentials(boolean  $cacheCredentials) 

Parameters

boolean $cacheCredentials

binaryVersion()

binaryVersion() : string|null

Returns the version of the svn binary contained in PATH

Returns

string|null

doAuthDance()

doAuthDance() : \Composer\Util\Svn

Repositories requests credentials, let's put them in.

Throws

\RuntimeException

Returns

\Composer\Util\Svn

getCommand()

getCommand(string  $cmd, string  $url, string  $path = null) : string

A method to create the svn commands run.

Parameters

string $cmd

Usually 'svn ls' or something like that.

string $url

Repo URL.

string $path

Target for a checkout

Returns

string

getCredentialString()

getCredentialString() : string

Return the credential string for the svn command.

Adds --no-auth-cache when credentials are present.

Returns

string

getPassword()

getPassword() : string

Get the password for the svn command. Can be empty.

Throws

\LogicException

Returns

string

getUsername()

getUsername() : string

Get the username for the svn command.

Throws

\LogicException

Returns

string

hasAuth()

hasAuth() : boolean

Detect Svn Auth.

Returns

boolean

getAuthCache()

getAuthCache() : string

Return the no-auth-cache switch.

Returns

string

executeWithAuthRetry()

executeWithAuthRetry(  $svnCommand,   $cwd,   $url,   $path,   $verbose) 

Parameters

$svnCommand
$cwd
$url
$path
$verbose

createAuthFromConfig()

createAuthFromConfig() : boolean

Create the auth params from the configuration file.

Returns

boolean

createAuthFromUrl()

createAuthFromUrl() : boolean

Create the auth params from the url

Returns

boolean