class Update (View source)

Constants

MUTEX_KEY

Key of the mutex to be used when performing core upgrades.

Methods

static string|null
getLatestAvailableVersionNumber()

Fetch from the remote marketplace the latest available versions of the core and the packages.

getApplicationUpdateInformation()

Retrieves the info about the latest available information.

getLocalAvailableUpdates()

Looks in the designated updates location for all directories, ascertains what version they represent, and finds all versions greater than the currently installed version of concrete5.

static 
isCurrentVersionNewerThanDatabaseVersion()

Checks migrations to see if the current code DB version is greater than that registered in the database.

static 
updateToCurrentVersion(Configuration $configuration = null)

Upgrade the current core version to the latest locally available by running the applicable migrations.

getLatestAvailableUpdate()

Retrieves the info about the latest available information.

Details

static string|null getLatestAvailableVersionNumber()

Fetch from the remote marketplace the latest available versions of the core and the packages.

These operations are done only the first time or after at least APP_VERSION_LATEST_THRESHOLD seconds since the previous check.

Return Value

string|null

Returns the latest available core version (eg. '5.7.3.1'). If we can't retrieve the latest version and if this never succeeded previously, this function returns null

static RemoteApplicationUpdate|null getApplicationUpdateInformation()

Retrieves the info about the latest available information.

The effective request to the remote server is done just once per request.

Return Value

RemoteApplicationUpdate|null

ApplicationUpdate[] getLocalAvailableUpdates()

Looks in the designated updates location for all directories, ascertains what version they represent, and finds all versions greater than the currently installed version of concrete5.

Return Value

ApplicationUpdate[]

static isCurrentVersionNewerThanDatabaseVersion()

Checks migrations to see if the current code DB version is greater than that registered in the database.

static updateToCurrentVersion(Configuration $configuration = null)

Upgrade the current core version to the latest locally available by running the applicable migrations.

Parameters

Configuration $configuration

Exceptions

MigrationIncompleteException

throws a MigrationIncompleteException exception if there's still some migration pending

static protected RemoteApplicationUpdate|null getLatestAvailableUpdate()

Retrieves the info about the latest available information.

Return Value

RemoteApplicationUpdate|null