protected function getPhpRequiredVersion()
    {
        if (!file_exists($path = $this->rootPath . '/composer.lock')) {
            return self::LEGACY_REQUIRED_PHP_VERSION;
        }

        $composerLock = json_decode(file_get_contents($path), true);
        foreach ($composerLock['packages'] as $package) {
            if ($package['name'] === 'bolt/bolt') {
                return (int) $package['version'][1] > 3 ? self::REQUIRED_PHP_VERSION : self::LEGACY_REQUIRED_PHP_VERSION;
            }
        }

        return self::LEGACY_REQUIRED_PHP_VERSION;
    }