Allow /-/ in MediaWikiVersionFetcher::fetchVersion
authorumherirrender <umherirrender_de.wp@web.de>
Fri, 31 Oct 2014 09:33:40 +0000 (10:33 +0100)
committerumherirrender <umherirrender_de.wp@web.de>
Fri, 31 Oct 2014 09:33:40 +0000 (10:33 +0100)
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

includes/MediaWikiVersionFetcher.php

index 17cb8aa..c3fb486 100644 (file)
@@ -19,7 +19,7 @@ class MediaWikiVersionFetcher {
                $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' );