src/Dev/Install/InstallConfig.php
public function getFrameworkVersion()
    {
        $composerLockPath = BASE_PATH . '/composer.lock';
        if (!file_exists($composerLockPath)) {
            return 'unknown';
        }
        $lockData = json_decode(file_get_contents($composerLockPath), true);
        if (json_last_error() || empty($lockData['packages'])) {
            return 'unknown';
        }
        foreach ($lockData['packages'] as $package) {
            if ($package['name'] === 'silverstripe/framework') {
                return $package['version'];
            }
        }
        return 'unknown';
    }
public function getFrameworkVersion()
    {
        $composerLockPath = BASE_PATH . '/composer.lock';
        if (!file_exists($composerLockPath)) {
            return 'unknown';
        }
        $lockData = json_decode(file_get_contents($composerLockPath), true);
        if (json_last_error() || empty($lockData['packages'])) {
            return 'unknown';
        }
        foreach ($lockData['packages'] as $package) {
            if ($package['name'] === 'silverstripe/framework') {
                return $package['version'];
            }
        }
        return 'unknown';
    }
public function getFrameworkVersion ( ) { $ composerLockPath = BASE_PATH . '/composer.lock' ; if ( ! file_exists ( $ composerLockPath ) ) { return 'unknown' ; } $ lockData = json_decode ( file_get_contents ( $ composerLockPath ) , true ) ; if ( json_last_error ( ) || empty ( $ lockData [ 'packages' ] ) ) { return 'unknown' ; } foreach ( $ lockData [ 'packages' ] as $ package ) { if ( $ package [ 'name' ] === 'silverstripe/framework' ) { return $ package [ 'version' ] ; } } return 'unknown' ; }
Get string representation of the framework version

@return string
Get string representation of the framework version