From 2124c780a82c5fff6795294dccaa1c35be87e232 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Fri, 31 Oct 2014 10:33:40 +0100 Subject: [PATCH] Allow /-/ in MediaWikiVersionFetcher::fetchVersion 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/MediaWikiVersionFetcher.php b/includes/MediaWikiVersionFetcher.php index 17cb8aa451..c3fb4869ad 100644 --- a/includes/MediaWikiVersionFetcher.php +++ b/includes/MediaWikiVersionFetcher.php @@ -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' ); -- 2.20.1