class VersionProvider (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 {@link LeftAndMain::CMSVersion()}

Example configuration:

SilverStripe\Core\Manifest\VersionProvider: modules:

package/name: Package Title

silverstripe/framework: Framework
silverstripe/cms: CMS

Methods

string
getVersion()

Gets a comma delimited string of package titles and versions

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.

array
getModuleVersionFromComposer(array $modules = [])

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

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 = [])

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

Parameters

array $modules

Return Value

array