Skip to content

Commit

Permalink
MDL-41787 make sure maturity constants are defined before they are us…
Browse files Browse the repository at this point in the history
…ed in core_component class
  • Loading branch information
skodak committed Sep 20, 2013
1 parent 7f3836d commit 81881cb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
15 changes: 15 additions & 0 deletions lib/classes/component.php
Expand Up @@ -24,6 +24,20 @@

defined('MOODLE_INTERNAL') || die();

// Constants used in version.php files, these must exist when core_component executes.

/** Software maturity level - internals can be tested using white box techniques. */
define('MATURITY_ALPHA', 50);
/** Software maturity level - feature complete, ready for preview and testing. */
define('MATURITY_BETA', 100);
/** Software maturity level - tested, will be released unless there are fatal bugs. */
define('MATURITY_RC', 150);
/** Software maturity level - ready for production deployment. */
define('MATURITY_STABLE', 200);
/** Any version - special value that can be used in $plugin->dependencies in version.php files. */
define('ANY_VERSION', 'any');


/**
* Collection of components related methods.
*/
Expand Down Expand Up @@ -268,6 +282,7 @@ protected static function fill_all_caches() {
protected static function fetch_core_version() {
global $CFG;
if (self::$version === null) {
$version = null; // Prevent IDE complaints.
require($CFG->dirroot . '/version.php');
self::$version = $version;
}
Expand Down
13 changes: 0 additions & 13 deletions lib/setuplib.php
Expand Up @@ -51,19 +51,6 @@
/** Extremely large memory limit - not recommended for standard scripts */
define('MEMORY_HUGE', -4);

/**
* Software maturity levels used by the core and plugins
*/
define('MATURITY_ALPHA', 50); // internals can be tested using white box techniques
define('MATURITY_BETA', 100); // feature complete, ready for preview and testing
define('MATURITY_RC', 150); // tested, will be released unless there are fatal bugs
define('MATURITY_STABLE', 200); // ready for production deployment

/**
* Special value that can be used in $plugin->dependencies in version.php files.
*/
define('ANY_VERSION', 'any');


/**
* Simple class. It is usually used instead of stdClass because it looks
Expand Down

0 comments on commit 81881cb

Please sign in to comment.