Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <tsteur@users.noreply.github.com>2020-06-16 23:20:25 +0300
committerGitHub <noreply@github.com>2020-06-16 23:20:25 +0300
commitce90503af76efa911564bdc82e1416a0867132c0 (patch)
tree8132863cc1e9a14be6e5b1eeeef0488ef54770cd
parent3864498a2e52d906851f7e961a59aa262e27bb87 (diff)
Add legacy autoloader for 2.x-dev for smoother upgrades (#16070)2.18.1-b1
-rw-r--r--LegacyAutoloader.php31
-rw-r--r--composer.json3
-rw-r--r--core/Plugin/ControllerAdmin.php2
-rw-r--r--core/Version.php2
4 files changed, 35 insertions, 3 deletions
diff --git a/LegacyAutoloader.php b/LegacyAutoloader.php
new file mode 100644
index 0000000000..b120a69176
--- /dev/null
+++ b/LegacyAutoloader.php
@@ -0,0 +1,31 @@
+<?php
+
+class LegacyAutoloader
+{
+ public function __construct()
+ {
+ spl_autoload_register(array($this, 'load_class'));
+ }
+
+ public static function register()
+ {
+ new LegacyAutoloader();
+ }
+
+ public function load_class($className)
+ {
+ if (strpos($className, 'Matomo\\') === 0) {
+ $newName = 'Piwik' . substr($className, 6);
+ if (class_exists($newName) && !class_exists($className, false)) {
+ @class_alias($newName, $className);
+ }
+ } elseif (strpos($className, 'Piwik\\') === 0) {
+ $newName = 'Matomo' . substr($className, 5);
+ if (class_exists($newName) && !class_exists($className, false)) {
+ @class_alias($newName, $className);
+ }
+ }
+ }
+}
+
+LegacyAutoloader::register();
diff --git a/composer.json b/composer.json
index e3b0767423..513fa7273e 100644
--- a/composer.json
+++ b/composer.json
@@ -107,7 +107,8 @@
"HTML_": "libs/",
"PEAR_": "libs/",
"Archive_": "libs/"
- }
+ },
+ "files": ["LegacyAutoloader.php"]
},
"autoload-dev": {
"psr-4": {
diff --git a/core/Plugin/ControllerAdmin.php b/core/Plugin/ControllerAdmin.php
index 276e06557e..581515c9a7 100644
--- a/core/Plugin/ControllerAdmin.php
+++ b/core/Plugin/ControllerAdmin.php
@@ -207,7 +207,7 @@ abstract class ControllerAdmin extends Controller
*/
private static function getNextRequiredMinimumPHP()
{
- return '5.5.9';
+ return '7.2.5';
}
private static function isUsingPhpVersionCompatibleWithNextPiwik()
diff --git a/core/Version.php b/core/Version.php
index ed20020eeb..ce19cf8371 100644
--- a/core/Version.php
+++ b/core/Version.php
@@ -20,7 +20,7 @@ final class Version
* The current Piwik version.
* @var string
*/
- const VERSION = '2.18.0';
+ const VERSION = '2.18.1-b1';
public function isStableVersion($version)
{