Skip to content

Commit

Permalink
Use rebranded components (matomo-org#15253)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiehl authored and tsteur committed Jan 27, 2020
1 parent f734983 commit 907a3d6
Show file tree
Hide file tree
Showing 98 changed files with 489 additions and 404 deletions.
26 changes: 26 additions & 0 deletions LegacyAutoloader.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?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, 'Piwik\\') === 0) {
$newName = 'Matomo' . substr($className, 5);
if (class_exists($newName)) {
class_alias($newName, $className);
}
}
}
}

LegacyAutoloader::register();
15 changes: 8 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@
"symfony/console": "~2.6.0",
"mustangostang/spyc": "~0.6.0",
"piwik/device-detector": "~3.0",
"piwik/decompress": "~1.0",
"piwik/network": "~0",
"piwik/cache": "~1.0.0",
"piwik/ini": "^1.0.8",
"matomo/decompress": "~2.0",
"matomo/cache": "~2.0",
"matomo/ini": "~2.0",
"php-di/php-di": "^5.0.0",
"psr/log": "~1.0",
"monolog/monolog": "~1.11",
Expand All @@ -44,12 +43,13 @@
"matomo/referrer-spam-blacklist": "~1.0",
"matomo/searchengine-and-social-list": "~1.0",
"tecnickcom/tcpdf": "~6.0",
"piwik/piwik-php-tracker": "^1.0.0",
"composer/semver": "~1.3.0",
"szymach/c-pchart": "^2.0",
"geoip2/geoip2": "^2.8",
"davaxi/sparkline": "dev-multiple-series",
"matomo-org/jshrink": "1.3.1"
"matomo-org/jshrink": "1.3.1",
"matomo/network": "~2.0",
"matomo/matomo-php-tracker": "~2.0"
},
"require-dev": {
"aws/aws-sdk-php": "2.7.1",
Expand Down Expand Up @@ -148,7 +148,8 @@
"HTML_": "libs/",
"PEAR_": "libs/",
"Archive_": "libs/"
}
},
"files": ["LegacyAutoloader.php"]
},
"autoload-dev": {
"psr-4": {
Expand Down
Loading

0 comments on commit 907a3d6

Please sign in to comment.