Documentation

ChangeLog
in package

Helper for adding entries to the change log(s).

Tags
category

Horde

author

Gunnar Wrobel wrobel@pardus.de

author

Jan Schneider jan@horde.org

license

http://www.horde.org/licenses/lgpl21 LGPL 2.1

Table of Contents

$_component  : Component
$_directory  : string
The path to the component directory.
__construct()  : mixed
Constructor.
addChangelog()  : void
Add a change log entry to changelog.yml
changelogFileExists()  : string|bool
Indicates if there is a changelog.yml file for this component.
changelogYml()  : string
Update changelog.yml file.
changesFileExists()  : string|bool
Indicates if there is a CHANGES file for this component.
getChangelogLink()  : string
Returns the link to the CHANGES file on GitHub.
migrateToChangelogYml()  : void
Builds a changelog.yml from an existing package.xml.
packageXml()  : string
Update package.xml file.
setVersion()  : void
Changes the current version number in changelog.yml.
timestamp()  : void
Timestamps the current version in changelog.yml.
updateChanges()  : string|null
Updates CHANGES from changelog.yml.
updatePackage()  : string
Updates package.xml from changelog.yml.
_systemInDirectory()  : string
Run a system call.

Properties

$_directory

The path to the component directory.

protected string $_directory

Methods

__construct()

Constructor.

public __construct(Config $config, Component $_component) : mixed
Parameters
$config : Config

The configuration.

$_component : Component

A component object.

Return values
mixed

addChangelog()

Add a change log entry to changelog.yml

public addChangelog(string $entry) : void
Parameters
$entry : string

Change log entry to add.

Return values
void

changelogFileExists()

Indicates if there is a changelog.yml file for this component.

public changelogFileExists() : string|bool
Return values
string|bool

The path to the changelog.yml file if it exists, false otherwise.

changelogYml()

Update changelog.yml file.

public changelogYml(string $log, array<string|int, mixed> $options) : string
Parameters
$log : string

The log entry.

$options : array<string|int, mixed>

Additional options.

Return values
string

Path to the updated changelog.yml file.

changesFileExists()

Indicates if there is a CHANGES file for this component.

public changesFileExists() : string|bool
Return values
string|bool

The path to the CHANGES file if it exists, false otherwise.

Returns the link to the CHANGES file on GitHub.

public getChangelogLink(string $root) : string
Parameters
$root : string

The root of the component in the repository.

Return values
string

The link to the change log.

migrateToChangelogYml()

Builds a changelog.yml from an existing package.xml.

public migrateToChangelogYml(Horde_Pear_Package_Xml $xml) : void
Parameters
$xml : Horde_Pear_Package_Xml

The package xml handler.

Return values
void

packageXml()

Update package.xml file.

public packageXml(string $log, Horde_Pear_Package_Xml $xml) : string
Parameters
$log : string

The log entry.

$xml : Horde_Pear_Package_Xml

The package xml handler.

Return values
string

Path to the updated package.xml file.

setVersion()

Changes the current version number in changelog.yml.

public setVersion(string $version, string $api) : void

It's important to run this method before updating the version in .horde.yml, because the old, to-be-replaced version is retrieved from there.

Parameters
$version : string

The new release version.

$api : string

The new api version.

Return values
void

timestamp()

Timestamps the current version in changelog.yml.

public timestamp() : void
Return values
void

updateChanges()

Updates CHANGES from changelog.yml.

public updateChanges() : string|null
Return values
string|null

Path to the updated CHANGES file.

updatePackage()

Updates package.xml from changelog.yml.

public updatePackage(Horde_Pear_Package_Xml $xml) : string
Parameters
$xml : Horde_Pear_Package_Xml

The package xml handler.

Return values
string

Path to the updated package.xml file.

_systemInDirectory()

Run a system call.

protected _systemInDirectory(string $call, string $target_dir) : string
Parameters
$call : string

The system call to execute.

$target_dir : string

Run the command in the provided target path.

Return values
string

The command output.

Search results