SvnDriver
extends VcsDriver
in package
A driver implementation for driver with authentication interaction.
Tags
Table of Contents
- $baseUrl : mixed
- $branches : mixed
- $branchesPath : mixed
- $cache : Cache
- $cacheCredentials : mixed
- $config : Config
- $infoCache : array<string|int, mixed>
- $io : IOInterface
- $originUrl : string
- $packagePath : mixed
- $process : ProcessExecutor
- $remoteFilesystem : RemoteFilesystem
- $repoConfig : array<string|int, mixed>
- $rootIdentifier : mixed
- $tags : mixed
- $tagsPath : mixed
- $trunkPath : mixed
- $url : string
- $util : Svn
- __construct() : mixed
- Constructor.
- cleanup() : mixed
- Performs any cleanup necessary as the driver is not longer needed
- getBranches() : mixed
- {@inheritDoc}
- getChangeDate() : mixed
- {@inheritdoc}
- getComposerInformation() : array<string|int, mixed>
- Return the composer.json file information
- getDist() : mixed
- {@inheritDoc}
- getFileContent() : mixed
- getRootIdentifier() : mixed
- {@inheritDoc}
- getSource() : mixed
- {@inheritDoc}
- getTags() : mixed
- {@inheritDoc}
- getUrl() : mixed
- {@inheritDoc}
- hasComposerFile() : bool
- Return true if the repository has a composer file for a given identifier, false otherwise.
- initialize() : mixed
- {@inheritDoc}
- supports() : mixed
- {@inheritDoc}
- buildIdentifier() : string
- Build the identifier respecting "package-path" config option
- execute() : string
- Execute an SVN command and try to fix up the process with credentials if necessary.
- getBaseComposerInformation() : mixed
- getContents() : mixed
- Get the remote content.
- getScheme() : string
- Get the https or http protocol depending on SSL support.
- normalizeUrl() : string
- An absolute path (leading '/') is converted to a file:// url.
- shouldCache() : bool
- Returns whether or not the given $identifier should be cached or not.
Properties
$baseUrl
protected
mixed
$baseUrl
$branches
protected
mixed
$branches
$branchesPath
protected
mixed
$branchesPath
= 'branches'
$cache
protected
Cache
$cache
$cacheCredentials
protected
mixed
$cacheCredentials
= true
$config
protected
Config
$config
$infoCache
protected
array<string|int, mixed>
$infoCache
= array()
$io
protected
IOInterface
$io
$originUrl
protected
string
$originUrl
$packagePath
protected
mixed
$packagePath
= ''
$process
protected
ProcessExecutor
$process
$remoteFilesystem
protected
RemoteFilesystem
$remoteFilesystem
$repoConfig
protected
array<string|int, mixed>
$repoConfig
$rootIdentifier
protected
mixed
$rootIdentifier
$tags
protected
mixed
$tags
$tagsPath
protected
mixed
$tagsPath
= 'tags'
$trunkPath
protected
mixed
$trunkPath
= 'trunk'
$url
protected
string
$url
$util
private
Svn
$util
Methods
__construct()
Constructor.
public
final __construct(array<string|int, mixed> $repoConfig, IOInterface $io, Config $config[, ProcessExecutor $process = null ][, RemoteFilesystem $remoteFilesystem = null ]) : mixed
Parameters
- $repoConfig : array<string|int, mixed>
-
The repository configuration
- $io : IOInterface
-
The IO instance
- $config : Config
-
The composer configuration
- $process : ProcessExecutor = null
-
Process instance, injectable for mocking
- $remoteFilesystem : RemoteFilesystem = null
-
Remote Filesystem, injectable for mocking
Return values
mixed —cleanup()
Performs any cleanup necessary as the driver is not longer needed
public
cleanup() : mixed
Return values
mixed —getBranches()
{@inheritDoc}
public
getBranches() : mixed
Return values
mixed —getChangeDate()
{@inheritdoc}
public
getChangeDate(mixed $identifier) : mixed
Parameters
- $identifier : mixed
Return values
mixed —getComposerInformation()
Return the composer.json file information
public
getComposerInformation(mixed $identifier) : array<string|int, mixed>
Parameters
- $identifier : mixed
-
Any identifier to a specific branch/tag/commit
Return values
array<string|int, mixed> —containing all infos from the composer.json file
getDist()
{@inheritDoc}
public
getDist(mixed $identifier) : mixed
Parameters
- $identifier : mixed
Return values
mixed —getFileContent()
public
getFileContent(string $file, string $identifier) : mixed
Parameters
- $file : string
- $identifier : string
Return values
mixed —getRootIdentifier()
{@inheritDoc}
public
getRootIdentifier() : mixed
Return values
mixed —getSource()
{@inheritDoc}
public
getSource(mixed $identifier) : mixed
Parameters
- $identifier : mixed
Return values
mixed —getTags()
{@inheritDoc}
public
getTags() : mixed
Return values
mixed —getUrl()
{@inheritDoc}
public
getUrl() : mixed
Return values
mixed —hasComposerFile()
Return true if the repository has a composer file for a given identifier, false otherwise.
public
hasComposerFile(mixed $identifier) : bool
Parameters
- $identifier : mixed
-
Any identifier to a specific branch/tag/commit
Return values
bool —Whether the repository has a composer file for a given identifier.
initialize()
{@inheritDoc}
public
initialize() : mixed
Return values
mixed —supports()
{@inheritDoc}
public
static supports(IOInterface $io, Config $config, mixed $url[, mixed $deep = false ]) : mixed
Parameters
- $io : IOInterface
- $config : Config
- $url : mixed
- $deep : mixed = false
Return values
mixed —buildIdentifier()
Build the identifier respecting "package-path" config option
protected
buildIdentifier(string $baseDir, int $revision) : string
Parameters
- $baseDir : string
-
The path to trunk/branch/tag
- $revision : int
-
The revision mark to add to identifier
Return values
string —execute()
Execute an SVN command and try to fix up the process with credentials if necessary.
protected
execute(string $command, string $url) : string
Parameters
- $command : string
-
The svn command to run.
- $url : string
-
The SVN URL.
Tags
Return values
string —getBaseComposerInformation()
protected
getBaseComposerInformation(mixed $identifier) : mixed
Parameters
- $identifier : mixed
Return values
mixed —getContents()
Get the remote content.
protected
getContents(string $url) : mixed
Parameters
- $url : string
-
The URL of content
Return values
mixed —The result
getScheme()
Get the https or http protocol depending on SSL support.
protected
getScheme() : string
Call this only if you know that the server supports both.
Return values
string —The correct type of protocol
normalizeUrl()
An absolute path (leading '/') is converted to a file:// url.
protected
static normalizeUrl(string $url) : string
Parameters
- $url : string
Return values
string —shouldCache()
Returns whether or not the given $identifier should be cached or not.
protected
shouldCache(mixed $identifier) : bool
Parameters
- $identifier : mixed