<?php /*

 Composr
 Copyright (c) Christopher Graham, 2004-2024

 See docs/LICENSE.md for full licensing information.


 NOTE TO PROGRAMMERS:
   Do not edit this file. If you need to make changes, save your changed file to the appropriate *_custom folder
   **** If you ignore this advice, then your website upgrades (e.g. for bug fixes) will likely kill your changes ****

*/

/**
 * @license    http://opensource.org/licenses/cpal_1.0 Common Public Attribution License
 * @copyright  Christopher Graham
 * @package    core
 */

// This file must work completely standalone, and should be API-locked even across versions.

/*
    The version numbers here are not for interchange. sources/version2.php provides a way to turn these into the 'dotted' interchange format that the software platform recognises programmatically.
*/

/**
 * Standard code module initialisation function.
 *
 * @ignore
 */
function init__version()
{
    if (!defined('CMS_REPOS_URL')) {
        define('CMS_REPOS_URL', 'https://gitlab.com/composr-foundation/composr');

        define('VERSION_ALPHA', 'Alpha');
        define('VERSION_BETA', 'Beta');
        define('VERSION_MAINLINE', 'Mainline');
        define('VERSION_SUPPORTED', 'Supported');
        define('VERSION_EOL', 'EOL');

        define('STABLE_BRANCH_NAME', 'master');
    }
}

/**
 * Get the minor/patch version of your installation. This changes with each release, including bug fix releases. It generally consists of 'a' or 'a.b', where 'a' increments represent major changes and 'b' increments represent tiny changes or alpha/beta/RC numbering.
 *
 * @return string The minor/patch version number of your installation (e.g. 0.1 or 1.1 or RC1 or 1.RC1)
 */
function cms_version_minor() : string
{
    return 'beta1';
}

/**
 * Get the general version number of your installation (incorporates major and first [numeric] component of minor version number).
 *
 * @return float The general version number of your installation
 */
function cms_version_number() : float
{
    return 11.0;
}

/**
 * Get the timestamp at which this version was released.
 *
 * @return integer The timestamp at which this version was released
 */
function cms_version_time() : int
{
    return 1721678521;
}

// cms_version_time_major() was removed in v11. This was never used in v10 and was also not planned for any use in v11.

/**
 * Get the timestamp at which a database / module change was last made.
 * This will dictate when the installer instructs the user to perform a database / module upgrade and will also lock out the system scheduler.
 *
 * @return integer The timestamp at which a database / module change was last made
 */
function cms_version_time_db() : int
{
    return 1723865750;
}

/**
 * Find the status of this branch version.
 * Developers should also edit is_release_discontinued if setting this to VERSION_EOL.
 *
 * @return string A VERSION_* constant
 */
function cms_version_branch_status() : string
{
    return VERSION_BETA;
}
