Alters MediaWikiVersionFetcher::fetchVersion() so that tests allow
versions to use Semantic Versioning (http://semver.org/)
See I2255ac2999ad207203fa6514f2e1b23f5d7965d7 for the fix in REL1_24
Change-Id: I6e9e154f864e771a02ae1da0e1530afe7f8a4cd0
$defaultSettings = file_get_contents( __DIR__ . '/DefaultSettings.php' );
$matches = array();
- preg_match( "/wgVersion = '([0-9a-zA-Z\.]+)';/", $defaultSettings, $matches );
+ preg_match( "/wgVersion = '([0-9a-zA-Z\.\-]+)';/", $defaultSettings, $matches );
if ( count( $matches ) !== 2 ) {
throw new RuntimeException( 'Could not extract the MediaWiki version from DefaultSettings.php' );