class SilverStripeVersionProvider (View source)

The version provider will look up configured modules and examine the composer.lock file to find the current version installed for each. This is used for the logo title in the CMS via LeftAndMain::CMSVersion()

Example configuration:

SilverStripeVersionProvider:
  modules:
    # package/name: Package Title
    silverstripe/framework: Framework
    silverstripe/cms: CMS

Methods

public
string
getVersion()

Gets a comma delimited string of package titles and versions

public
array
getModules()

Gets the configured core modules to use for the SilverStripe application version. Filtering is used to ensure that modules can turn the result off for other modules, e.g. CMS can disable Framework.

public
array
getModuleVersionFromComposer(array $modules = array())

Tries to obtain version number from composer.lock if it exists

protected
array
getComposerLock(bool $cache = true)

Load composer.lock's contents and return it

Details

string getVersion()

Gets a comma delimited string of package titles and versions

Return Value

string

array getModules()

Gets the configured core modules to use for the SilverStripe application version. Filtering is used to ensure that modules can turn the result off for other modules, e.g. CMS can disable Framework.

Return Value

array

array getModuleVersionFromComposer(array $modules = array())

Tries to obtain version number from composer.lock if it exists

Parameters

array $modules

Return Value

array

protected array getComposerLock(bool $cache = true)

Load composer.lock's contents and return it

Parameters

bool $cache

Return Value

array