All Data Structures Functions Variables Pages
Static Public Member Functions | Data Fields | Static Protected Member Functions
UpgradeUtil Class Reference

Static Public Member Functions

static runPart1 (MessageStreamer $messageStreamer, $doNotlAlterFiles=false)
 
static runPart2 (MessageStreamer $messageStreamer)
 
static isApplicationInUpgradeMode ()
 
static checkIfThereAreJobsInProcess ()
 
static getUpgradeFolderPath ()
 
static setUpgradeState ($key, $value)
 
static getUpgradeState ($key)
 
static unsetUpgradeState ()
 
static isUpgradeStateValid ()
 

Data Fields

const UPGRADE_STATE_KEY = 'zurmoUpgrade'
 

Static Protected Member Functions

static checkPermissions ()
 
static checkIfZipExtensionIsLoaded ()
 
static setCurrentZurmoVersion ()
 
static checkForUpgradeZip ()
 
static unzipUpgradeZip ($upgradeZipFilePath)
 
static checkManifestIfVersionIsOk ($upgradeExtractPath)
 
static loadUpgraderComponent ($upgradeExtractPath, MessageLogger $messageLogger)
 
static clearCache ()
 
static processBeforeConfigFiles ()
 
static processConfigFiles ($pathToConfigurationFolder)
 
static processAfterConfigFiles ()
 
static processBeforeFiles ()
 
static processFiles ($upgradeExtractPath, $configuration)
 
static processAfterFiles ()
 
static processBeforeUpdateSchema ()
 
static processUpdateSchema ($messageLogger)
 
static processAfterUpdateSchema ()
 
static clearAssetsAndRunTimeItems ()
 
static processFinalTouches ()
 
static removeUpgradeFiles ($upgradeExtractPath)
 

Detailed Description

Definition at line 37 of file UpgradeUtil.php.

Member Function Documentation

static runPart1 ( MessageStreamer  $messageStreamer,
  $doNotlAlterFiles = false 
)
static

Run first part of upgrade process, which includes:

  • Checking if application is in maintenance mode
  • Check file permissions
  • Check if php zip extension is loaded
  • Load UpgraderComponent from extracted upgrade files
  • Modify configure files if needed
  • Copy, add and remove files
    Parameters
    MessageStreamer$messageStreamer

Definition at line 51 of file UpgradeUtil.php.

static runPart2 ( MessageStreamer  $messageStreamer)
static

Run second and last part of upgrade process, which include:

  • Update schema
  • Clean assets and runtime foders
  • Process final tasks
  • Remove upgrade files
  • Clear cache
    Parameters
    MessageStreamer$messageStreamer

Definition at line 114 of file UpgradeUtil.php.

static getUpgradeFolderPath ( )
static

Return path to upgrade folder

Returns
string

Definition at line 202 of file UpgradeUtil.php.

static checkPermissions ( )
staticprotected

Check if all files are directories are writeable by user.

Exceptions
FileNotWriteableException
Returns
boolean

Definition at line 212 of file UpgradeUtil.php.

static checkIfZipExtensionIsLoaded ( )
staticprotected

Check if PHP Zip extension is loaded.

Exceptions
NotSupportedException
Returns
boolean

Definition at line 233 of file UpgradeUtil.php.

static setCurrentZurmoVersion ( )
staticprotected

Set current Zurmo version

Definition at line 247 of file UpgradeUtil.php.

static checkForUpgradeZip ( )
staticprotected

Check if one and only one zip file exist, so upgrade process will use it.

Exceptions
NotFoundException
NotSupportedException
Returns
string $upgradeZipFile - path to zip file

Definition at line 259 of file UpgradeUtil.php.

static unzipUpgradeZip (   $upgradeZipFilePath)
staticprotected

Unzip upgrade files.

Parameters
string$upgradeZipFilePath
Exceptions
NotSupportedException
Returns
string - path to unzipped files

Definition at line 297 of file UpgradeUtil.php.

static checkManifestIfVersionIsOk (   $upgradeExtractPath)
staticprotected

Check if upgrade version is correct, and if can be executed for current ZUrmo version.

Parameters
string$upgradeExtractPath
Exceptions
NotSupportedException
Returns
array

Definition at line 327 of file UpgradeUtil.php.

static loadUpgraderComponent (   $upgradeExtractPath,
MessageLogger  $messageLogger 
)
staticprotected

Load upgrader component as yii component from upgrade files.

Parameters
string$upgradeExtractPath

Definition at line 366 of file UpgradeUtil.php.

static clearCache ( )
staticprotected

Clear cache

Definition at line 387 of file UpgradeUtil.php.

static processBeforeConfigFiles ( )
staticprotected

This is just wrapper function to call function from UpgraderComponent

Definition at line 395 of file UpgradeUtil.php.

static processConfigFiles (   $pathToConfigurationFolder)
staticprotected

This is just wrapper function to call function from UpgraderComponent

Definition at line 403 of file UpgradeUtil.php.

static processAfterConfigFiles ( )
staticprotected

This is just wrapper function to call function from UpgraderComponent

Definition at line 411 of file UpgradeUtil.php.

static processBeforeFiles ( )
staticprotected

This is just wrapper function to call function from UpgraderComponent

Definition at line 419 of file UpgradeUtil.php.

static processFiles (   $upgradeExtractPath,
  $configuration 
)
staticprotected

This is just wrapper function to call function from UpgraderComponent

Parameters
string$upgradeExtractPath
array$configuration

Definition at line 429 of file UpgradeUtil.php.

static processAfterFiles ( )
staticprotected

This is just wrapper function to call function from UpgraderComponent

Definition at line 439 of file UpgradeUtil.php.

static processBeforeUpdateSchema ( )
staticprotected

This is just wrapper function to call function from UpgraderComponent

Definition at line 447 of file UpgradeUtil.php.

static processUpdateSchema (   $messageLogger)
staticprotected

This is just wrapper function to call function from UpgraderComponent

Definition at line 455 of file UpgradeUtil.php.

static processAfterUpdateSchema ( )
staticprotected

This is just wrapper function to call function from UpgraderComponent

Definition at line 463 of file UpgradeUtil.php.

static clearAssetsAndRunTimeItems ( )
staticprotected

This is just wrapper function to call function from UpgraderComponent

Definition at line 471 of file UpgradeUtil.php.

static processFinalTouches ( )
staticprotected

This is just wrapper function to call function from UpgraderComponent

Definition at line 479 of file UpgradeUtil.php.

static setUpgradeState (   $key,
  $value 
)
static

Set upgrade state into Zurmo persistent storage

Parameters
string$key
string$value
Returns
boolean

Definition at line 495 of file UpgradeUtil.php.

static getUpgradeState (   $key)
static

Get upgrade state from Zurmo persistent storage

Parameters
string$key
Returns
mixed

Definition at line 509 of file UpgradeUtil.php.

static unsetUpgradeState ( )
static

Clear upgrade info from Zurmo state persister

Definition at line 523 of file UpgradeUtil.php.

static isUpgradeStateValid ( )
static

Check if upgrade state still valid

Returns
boolean

Definition at line 536 of file UpgradeUtil.php.


The documentation for this class was generated from the following file:
Generated on Fri Jan 24 2020 07:10:46