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:
authorStefan Giehl <stefan@matomo.org>2020-01-20 22:26:09 +0300
committerThomas Steur <tsteur@users.noreply.github.com>2020-01-20 22:26:09 +0300
commit9735fdda9fe991ad8d894bd8311e335ac6dcb2b0 (patch)
tree93499ddafdb7b3bfcaec27b2418e311dadb369f4
parent9af15986a92976ae5a179835ce5cd76b1da25fa6 (diff)
Removes some code marked as deprecated (#15419)
-rw-r--r--CHANGELOG.md13
-rw-r--r--core/API/DataTableManipulator/Flattener.php1
-rw-r--r--core/API/DataTableManipulator/ReportTotalsCalculator.php1
-rw-r--r--core/API/Proxy.php1
-rw-r--r--core/API/Request.php1
-rw-r--r--core/Application/Kernel/EnvironmentValidator.php2
-rw-r--r--core/Archive/ArchiveInvalidator.php1
-rw-r--r--core/Archive/ArchivePurger.php2
-rw-r--r--core/Archive/Chunk.php2
-rw-r--r--core/Archive/DataTableFactory.php6
-rw-r--r--core/AssetManager/UIAssetMerger/JScriptUIAssetMerger.php1
-rw-r--r--core/Cache.php1
-rw-r--r--core/Category/CategoryList.php1
-rw-r--r--core/Columns/ComputedMetricFactory.php2
-rw-r--r--core/Columns/DimensionMetricFactory.php1
-rw-r--r--core/Columns/Updater.php1
-rw-r--r--core/Common.php100
-rw-r--r--core/Concurrency/LockBackend/MySqlLockBackend.php1
-rw-r--r--core/Config.php2
-rw-r--r--core/Config/Cache.php1
-rw-r--r--core/Console.php2
-rw-r--r--core/CronArchive.php1
-rw-r--r--core/CronArchive/Performance/Logger.php1
-rw-r--r--core/DataAccess/ArchiveTableDao.php1
-rw-r--r--core/DataAccess/LogAggregator.php5
-rw-r--r--core/DataAccess/LogTableTemporary.php3
-rw-r--r--core/DataTable/Filter/AddSegmentValue.php2
-rw-r--r--core/DataTable/Filter/Sort.php2
-rw-r--r--core/DataTable/Renderer.php1
-rw-r--r--core/Date.php1
-rw-r--r--core/Db/Schema/Mysql.php1
-rw-r--r--core/DeviceDetector/DeviceDetectorFactory.php1
-rw-r--r--core/DeviceDetectorFactory.php27
-rw-r--r--core/Filesystem.php2
-rw-r--r--core/Http/ControllerResolver.php2
-rw-r--r--core/Http/Router.php2
-rw-r--r--core/Mail.php1
-rw-r--r--core/Menu/MenuAdmin.php1
-rw-r--r--core/Menu/MenuTop.php2
-rw-r--r--core/Metrics.php1
-rw-r--r--core/Metrics/Sorter.php1
-rw-r--r--core/MetricsFormatter.php9
-rw-r--r--core/Piwik.php14
-rw-r--r--core/Plugin.php1
-rw-r--r--core/Plugin/ArchivedMetric.php1
-rw-r--r--core/Plugin/Controller.php1
-rw-r--r--core/Plugin/Manager.php1
-rw-r--r--core/Plugin/ViewDataTable.php2
-rw-r--r--core/Plugin/WidgetsProvider.php1
-rw-r--r--core/Registry.php63
-rw-r--r--core/Session/SaveHandler/DbTable.php1
-rw-r--r--core/Settings/Measurable/MeasurableProperty.php1
-rw-r--r--core/Settings/Measurable/MeasurableSetting.php1
-rw-r--r--core/Settings/Measurable/MeasurableSettings.php2
-rw-r--r--core/Settings/Plugin/SystemConfigSetting.php2
-rw-r--r--core/Settings/Plugin/SystemSetting.php1
-rw-r--r--core/Settings/Plugin/SystemSettings.php2
-rw-r--r--core/Settings/Plugin/UserSetting.php2
-rw-r--r--core/Settings/Plugin/UserSettings.php2
-rw-r--r--core/Settings/Storage/Backend/Cache.php1
-rw-r--r--core/Settings/Storage/Backend/MeasurableSettingsTable.php3
-rw-r--r--core/Settings/Storage/Backend/NullBackend.php2
-rw-r--r--core/Settings/Storage/Backend/PluginSettingsTable.php3
-rw-r--r--core/Site.php20
-rw-r--r--core/TaskScheduler.php120
-rw-r--r--core/Tracker/Action.php2
-rw-r--r--core/Tracker/Cache.php1
-rw-r--r--core/Tracker/Db.php3
-rw-r--r--core/Tracker/GoalManager.php1
-rw-r--r--core/Tracker/Handler.php1
-rw-r--r--core/Tracker/Settings.php1
-rw-r--r--core/Tracker/TableLogAction.php1
-rw-r--r--core/Tracker/TrackerCodeGenerator.php1
-rw-r--r--core/Tracker/TrackerConfig.php1
-rw-r--r--core/Tracker/Visitor.php2
-rw-r--r--core/Translation/Translator.php1
-rw-r--r--core/Updater.php1
-rw-r--r--core/Updater/Migration.php1
-rw-r--r--core/Updater/Migration/Db/DropIndex.php2
-rw-r--r--core/Updater/Migration/Db/DropTable.php2
-rw-r--r--core/Updater/Migration/Db/Insert.php1
-rw-r--r--core/Updater/Migration/Db/Sql.php1
-rw-r--r--core/Updater/Migration/Factory.php2
-rw-r--r--core/Updates/1.5-b1.php1
-rw-r--r--core/Updates/2.10.0-b5.php1
-rw-r--r--core/Updates/2.14.0-b2.php1
-rw-r--r--core/Updates/2.14.2.php1
-rw-r--r--core/Updates/2.15.0-b12.php1
-rw-r--r--core/Updates/2.16.3-rc2.php4
-rw-r--r--core/Updates/3.0.0-b3.php1
-rw-r--r--core/Updates/3.10.0-b2.php1
-rw-r--r--core/Updates/3.11.0-b1.php1
-rw-r--r--core/Updates/3.12.0-b1.php1
-rw-r--r--core/Updates/3.5.1-b1.php1
-rw-r--r--core/Updates/3.6.0-b3.php1
-rw-r--r--core/Updates/3.6.1-b2.php1
-rw-r--r--core/Updates/3.8.0-b3.php1
-rw-r--r--core/Updates/4.0.0-b1.php1
-rw-r--r--core/Validators/IdSite.php2
-rw-r--r--core/View.php1
-rw-r--r--core/ViewDataTable/Request.php2
-rw-r--r--core/Widget/WidgetsList.php1
-rw-r--r--plugins/Goals/tests/Integration/APITest.php3
-rw-r--r--plugins/SitesManager/API.php12
-rw-r--r--tests/PHPUnit/Integration/FrontControllerTest.php8
-rw-r--r--tests/PHPUnit/Integration/ReleaseCheckListTest.php1
106 files changed, 22 insertions, 508 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b5fcdfc43f..8520396a62 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,11 +13,22 @@ The Product Changelog at **[matomo.org/changelog](https://matomo.org/changelog)*
* The deprecated Platform API method `\Piwik\Plugin::getListHooksRegistered()` has been removed. Use `\Piwik\Plugin::registerEvents()` instead
* The deprecated Platform API method `\Piwik\Piwik::doAsSuperUser()` has been removed. Use `\Piwik\Access::doAsSuperUser()` instead
* The deprecated Platform API method `\Piwik\SettingsPiwik::isPiwikInstalled()` has been removed. Use `\Piwik\SettingsPiwik::isMatomoInstalled()` instead
-
* The deprecated Platform API method `\Piwik\Updates::getSql()` has been removed. Use `\Piwik\Updates::getMigrations()` instead
* The deprecated Platform API method `\Piwik\Updates::getMigrationQueries()` has been removed. Use `\Piwik\Updates::getMigrations()` instead
* The deprecated Platform API method `\Piwik\Updates::executeMigrationQueries()` has been removed. Use `\Piwik\Updates::executeMigrations()` instead
* The deprecated Platform API method `\Piwik\Updates::update()` has been removed. Use `\Piwik\Updates::doUpdate()` instead
+* The deprecated Platform API method `\Piwik\Common::json_encode()` has been removed. Use `json_encode()` instead
+* The deprecated Platform API method `\Piwik\Common::json_decode()` has been removed. Use `json_decode()` instead
+* The deprecated Platform API method `\Piwik\Common::getContinentsList()` has been removed. Use `\Piwik\Intl\Data\Provider\RegionDataProvider::getContinentList()` instead
+* The deprecated Platform API method `\Piwik\Common::getCountriesList()` has been removed. Use `\Piwik\Intl\Data\Provider\RegionDataProvider::getCountriesList()` instead
+* The deprecated Platform API method `\Piwik\Common::getLanguagesList()` has been removed. Use `\Piwik\Intl\Data\Provider\LanguageDataProvider::getLanguagesList()` instead
+* The deprecated Platform API method `\Piwik\Common::getLanguageToCountryList()` has been removed. Use `\Piwik\Intl\Data\Provider\LanguageDataProvider::getLanguageToCountryList()` instead
+* The deprecated Platform API method `\Piwik\MetricsFormatter::getCurrencyList()` has been removed. Use `\Piwik\Intl\Data\Provider\CurrencyDataProvider::getCurrencyList()` instead
+* The deprecated Platform API method `\Piwik\Site::getCurrencyList()` has been removed. Use `\Piwik\Intl\Data\Provider\CurrencyDataProvider::getCurrencyList()` instead
+* The deprecated Platform API method `\Piwik\Piwik::setUserHasSuperUserAccess()` has been removed. Use `\Piwik\Access::doAsSuperUser()` instead
+* The deprecated Platform API class `\Piwik\Registry` has been removed. Use `\Piwik\Container\StaticContainer` instead
+* The deprecated Platform API class `\Piwik\TaskScheduler` has been removed. Use `\Piwik\Scheduler\Scheduler` instead
+* The deprecated Platform API class `\Piwik\DeviceDetectorFactory` has been removed. Use `\Piwik\DeviceDetector\DeviceDetectorFactory` instead
## Matomo 3.13.1
diff --git a/core/API/DataTableManipulator/Flattener.php b/core/API/DataTableManipulator/Flattener.php
index 2db6017ecc..b17b3eeafd 100644
--- a/core/API/DataTableManipulator/Flattener.php
+++ b/core/API/DataTableManipulator/Flattener.php
@@ -9,7 +9,6 @@
namespace Piwik\API\DataTableManipulator;
use Piwik\API\DataTableManipulator;
-use Piwik\Common;
use Piwik\DataTable;
use Piwik\DataTable\Row;
use Piwik\Plugin\ReportsProvider;
diff --git a/core/API/DataTableManipulator/ReportTotalsCalculator.php b/core/API/DataTableManipulator/ReportTotalsCalculator.php
index a6d4fcc538..ffa3d343a7 100644
--- a/core/API/DataTableManipulator/ReportTotalsCalculator.php
+++ b/core/API/DataTableManipulator/ReportTotalsCalculator.php
@@ -12,7 +12,6 @@ use Piwik\API\DataTableManipulator;
use Piwik\API\DataTablePostProcessor;
use Piwik\Common;
use Piwik\DataTable;
-use Piwik\Metrics;
use Piwik\Period;
use Piwik\Piwik;
use Piwik\Plugin\Report;
diff --git a/core/API/Proxy.php b/core/API/Proxy.php
index 3247bab24d..2d782bcfec 100644
--- a/core/API/Proxy.php
+++ b/core/API/Proxy.php
@@ -15,7 +15,6 @@ use Piwik\Container\StaticContainer;
use Piwik\Context;
use Piwik\Piwik;
use Piwik\Plugin\Manager;
-use Piwik\Singleton;
use ReflectionClass;
use ReflectionMethod;
diff --git a/core/API/Request.php b/core/API/Request.php
index 08dfc241ca..4d30aa13db 100644
--- a/core/API/Request.php
+++ b/core/API/Request.php
@@ -17,7 +17,6 @@ use Piwik\Context;
use Piwik\DataTable;
use Piwik\Exception\PluginDeactivatedException;
use Piwik\IP;
-use Piwik\Log;
use Piwik\Piwik;
use Piwik\Plugin\Manager as PluginManager;
use Piwik\Plugins\CoreHome\LoginWhitelist;
diff --git a/core/Application/Kernel/EnvironmentValidator.php b/core/Application/Kernel/EnvironmentValidator.php
index 5ab514fadf..a16c2baf21 100644
--- a/core/Application/Kernel/EnvironmentValidator.php
+++ b/core/Application/Kernel/EnvironmentValidator.php
@@ -9,8 +9,6 @@
namespace Piwik\Application\Kernel;
use Piwik\Common;
-use Piwik\Config;
-use Piwik\Exception\InvalidRequestParameterException;
use Piwik\Exception\NotYetInstalledException;
use Piwik\Filechecks;
use Piwik\Piwik;
diff --git a/core/Archive/ArchiveInvalidator.php b/core/Archive/ArchiveInvalidator.php
index b44d53c978..fcee4f7466 100644
--- a/core/Archive/ArchiveInvalidator.php
+++ b/core/Archive/ArchiveInvalidator.php
@@ -15,7 +15,6 @@ use Piwik\CronArchive\SitesToReprocessDistributedList;
use Piwik\DataAccess\ArchiveTableCreator;
use Piwik\DataAccess\Model;
use Piwik\Date;
-use Piwik\CliMulti\Process;
use Piwik\Option;
use Piwik\Common;
use Piwik\Piwik;
diff --git a/core/Archive/ArchivePurger.php b/core/Archive/ArchivePurger.php
index cd330ea37c..29ed4ce88f 100644
--- a/core/Archive/ArchivePurger.php
+++ b/core/Archive/ArchivePurger.php
@@ -9,13 +9,11 @@
namespace Piwik\Archive;
use Piwik\ArchiveProcessor\Rules;
-use Piwik\Common;
use Piwik\Config;
use Piwik\Container\StaticContainer;
use Piwik\DataAccess\ArchiveTableCreator;
use Piwik\DataAccess\Model;
use Piwik\Date;
-use Piwik\Db;
use Piwik\Piwik;
use Psr\Log\LoggerInterface;
use Psr\Log\LogLevel;
diff --git a/core/Archive/Chunk.php b/core/Archive/Chunk.php
index 392e49f695..4bde7c26c1 100644
--- a/core/Archive/Chunk.php
+++ b/core/Archive/Chunk.php
@@ -9,8 +9,6 @@
namespace Piwik\Archive;
-use Piwik\DataTable;
-
/**
* This class is used to split blobs of DataTables into chunks. Each blob used to be stored under one blob in the
* archive table. For better efficiency we do now combine multiple DataTable into one blob entry.
diff --git a/core/Archive/DataTableFactory.php b/core/Archive/DataTableFactory.php
index fdc69a5f54..45941befbf 100644
--- a/core/Archive/DataTableFactory.php
+++ b/core/Archive/DataTableFactory.php
@@ -9,14 +9,8 @@
namespace Piwik\Archive;
-use Piwik\API\Request;
-use Piwik\Cache;
-use Piwik\Cache\Transient;
-use Piwik\CacheId;
use Piwik\DataTable;
use Piwik\DataTable\Row;
-use Piwik\Period\Week;
-use Piwik\Piwik;
use Piwik\Segment;
use Piwik\Site;
diff --git a/core/AssetManager/UIAssetMerger/JScriptUIAssetMerger.php b/core/AssetManager/UIAssetMerger/JScriptUIAssetMerger.php
index e702bec26a..b57ed86cdf 100644
--- a/core/AssetManager/UIAssetMerger/JScriptUIAssetMerger.php
+++ b/core/AssetManager/UIAssetMerger/JScriptUIAssetMerger.php
@@ -12,7 +12,6 @@ use Piwik\AssetManager\UIAsset;
use Piwik\AssetManager\UIAssetCacheBuster;
use Piwik\AssetManager\UIAssetFetcher\JScriptUIAssetFetcher;
use Piwik\AssetManager\UIAssetMerger;
-use Piwik\AssetManager;
use Piwik\AssetManager\UIAssetMinifier;
use Piwik\Piwik;
diff --git a/core/Cache.php b/core/Cache.php
index 55a2362750..dc6d87b8d8 100644
--- a/core/Cache.php
+++ b/core/Cache.php
@@ -8,7 +8,6 @@
*/
namespace Piwik;
-use Piwik\Cache\Backend;
use Piwik\Container\StaticContainer;
class Cache
diff --git a/core/Category/CategoryList.php b/core/Category/CategoryList.php
index 4489528573..88b72b733f 100644
--- a/core/Category/CategoryList.php
+++ b/core/Category/CategoryList.php
@@ -8,7 +8,6 @@
namespace Piwik\Category;
use Piwik\Container\StaticContainer;
-use Piwik\Plugin;
/**
* Base type for category. lets you change the name for a categoryId and specifiy a different order
diff --git a/core/Columns/ComputedMetricFactory.php b/core/Columns/ComputedMetricFactory.php
index 90a8d5d73e..7bc12598cf 100644
--- a/core/Columns/ComputedMetricFactory.php
+++ b/core/Columns/ComputedMetricFactory.php
@@ -8,10 +8,8 @@
*/
namespace Piwik\Columns;
-use Piwik\Piwik;
use Piwik\Plugin\ArchivedMetric;
use Piwik\Plugin\ComputedMetric;
-use Piwik\Plugin\Report;
/**
* A factory to create computed metrics.
diff --git a/core/Columns/DimensionMetricFactory.php b/core/Columns/DimensionMetricFactory.php
index 9707aa5ae0..08f5bde847 100644
--- a/core/Columns/DimensionMetricFactory.php
+++ b/core/Columns/DimensionMetricFactory.php
@@ -11,7 +11,6 @@ namespace Piwik\Columns;
use Piwik\Piwik;
use Piwik\Plugin\ArchivedMetric;
use Piwik\Plugin\ComputedMetric;
-use Piwik\Plugin\Report;
/**
diff --git a/core/Columns/Updater.php b/core/Columns/Updater.php
index ead1a80085..85daa9fd5f 100644
--- a/core/Columns/Updater.php
+++ b/core/Columns/Updater.php
@@ -13,7 +13,6 @@ use Piwik\DbHelper;
use Piwik\Plugin\Dimension\ActionDimension;
use Piwik\Plugin\Dimension\VisitDimension;
use Piwik\Plugin\Dimension\ConversionDimension;
-use Piwik\Db;
use Piwik\Plugin\Manager;
use Piwik\Updater as PiwikUpdater;
use Piwik\Filesystem;
diff --git a/core/Common.php b/core/Common.php
index 598456904a..295f2bfc40 100644
--- a/core/Common.php
+++ b/core/Common.php
@@ -730,33 +730,6 @@ class Common
}
/**
- * JSON encode wrapper
- * - missing or broken in some php 5.x versions
- *
- * @param mixed $value
- * @return string
- * @deprecated
- */
- public static function json_encode($value)
- {
- return @json_encode($value);
- }
-
- /**
- * JSON decode wrapper
- * - missing or broken in some php 5.x versions
- *
- * @param string $json
- * @param bool $assoc
- * @return mixed
- * @deprecated
- */
- public static function json_decode($json, $assoc = false)
- {
- return json_decode($json, $assoc);
- }
-
- /**
* Detects whether an error occurred during the last json encode/decode.
* @return bool
*/
@@ -820,79 +793,6 @@ class Common
*/
/**
- * Returns list of continent codes
- *
- * @see core/DataFiles/Countries.php
- *
- * @return array Array of 3 letter continent codes
- *
- * @deprecated Use Piwik\Intl\Data\Provider\RegionDataProvider instead.
- * @see \Piwik\Intl\Data\Provider\RegionDataProvider::getContinentList()
- */
- public static function getContinentsList()
- {
- /** @var RegionDataProvider $dataProvider */
- $dataProvider = StaticContainer::get('Piwik\Intl\Data\Provider\RegionDataProvider');
- return $dataProvider->getContinentList();
- }
-
- /**
- * Returns list of valid country codes
- *
- * @see core/DataFiles/Countries.php
- *
- * @param bool $includeInternalCodes
- * @return array Array of (2 letter ISO codes => 3 letter continent code)
- *
- * @deprecated Use Piwik\Intl\Data\Provider\RegionDataProvider instead.
- * @see \Piwik\Intl\Data\Provider\RegionDataProvider::getCountryList()
- */
- public static function getCountriesList($includeInternalCodes = false)
- {
- /** @var RegionDataProvider $dataProvider */
- $dataProvider = StaticContainer::get('Piwik\Intl\Data\Provider\RegionDataProvider');
- return $dataProvider->getCountryList($includeInternalCodes);
- }
-
- /**
- * Returns the list of valid language codes.
- *
- * See [core/DataFiles/Languages.php](https://github.com/piwik/piwik/blob/master/core/DataFiles/Languages.php).
- *
- * @return array Array of two letter ISO codes mapped with their associated language names (in English). E.g.
- * `array('en' => 'English', 'ja' => 'Japanese')`.
- * @api
- *
- * @deprecated Use Piwik\Intl\Data\Provider\LanguageDataProvider instead.
- * @see \Piwik\Intl\Data\Provider\LanguageDataProvider::getLanguageList()
- */
- public static function getLanguagesList()
- {
- /** @var LanguageDataProvider $dataProvider */
- $dataProvider = StaticContainer::get('Piwik\Intl\Data\Provider\LanguageDataProvider');
- return $dataProvider->getLanguageList();
- }
-
- /**
- * Returns a list of language to country mappings.
- *
- * See [core/DataFiles/LanguageToCountry.php](https://github.com/piwik/piwik/blob/master/core/DataFiles/LanguageToCountry.php).
- *
- * @return array Array of two letter ISO language codes mapped with two letter ISO country codes:
- * `array('fr' => 'fr') // French => France`
- * @api
- *
- * @deprecated Use Piwik\Intl\Data\Provider\LanguageDataProvider instead.
- * @see \Piwik\Intl\Data\Provider\LanguageDataProvider::getLanguageToCountryList()
- */
- public static function getLanguageToCountryList()
- {
- /** @var LanguageDataProvider $dataProvider */
- $dataProvider = StaticContainer::get('Piwik\Intl\Data\Provider\LanguageDataProvider');
- return $dataProvider->getLanguageToCountryList();
- }
-
- /**
* Returns list of provider names
*
* @see core/DataFiles/Providers.php
diff --git a/core/Concurrency/LockBackend/MySqlLockBackend.php b/core/Concurrency/LockBackend/MySqlLockBackend.php
index 561c681ff1..5da2691e5f 100644
--- a/core/Concurrency/LockBackend/MySqlLockBackend.php
+++ b/core/Concurrency/LockBackend/MySqlLockBackend.php
@@ -13,7 +13,6 @@ namespace Piwik\Concurrency\LockBackend;
use Piwik\Common;
use Piwik\Concurrency\LockBackend;
use Piwik\Db;
-use Piwik\DbHelper;
class MySqlLockBackend implements LockBackend
{
diff --git a/core/Config.php b/core/Config.php
index f434a51fdd..713395cc88 100644
--- a/core/Config.php
+++ b/core/Config.php
@@ -11,8 +11,6 @@ namespace Piwik;
use Exception;
use Piwik\Application\Kernel\GlobalSettingsProvider;
-use Piwik\Config\Cache;
-use Piwik\Config\IniFileChain;
use Piwik\Container\StaticContainer;
use Piwik\Exception\MissingFilePermissionException;
use Piwik\ProfessionalServices\Advertising;
diff --git a/core/Config/Cache.php b/core/Config/Cache.php
index aa0bf80e9e..1538c65d94 100644
--- a/core/Config/Cache.php
+++ b/core/Config/Cache.php
@@ -10,7 +10,6 @@ namespace Piwik\Config;
use Piwik\Cache\Backend\File;
use Piwik\Common;
-use Piwik\Filesystem;
use Piwik\Piwik;
use Piwik\Url;
diff --git a/core/Console.php b/core/Console.php
index 945889bfed..86312b7f1e 100644
--- a/core/Console.php
+++ b/core/Console.php
@@ -13,10 +13,8 @@ use Monolog\Handler\FingersCrossedHandler;
use Piwik\Application\Environment;
use Piwik\Config\ConfigNotFoundException;
use Piwik\Container\StaticContainer;
-use Piwik\Exception\AuthenticationFailedException;
use Piwik\Plugin\Manager as PluginManager;
use Piwik\Plugins\Monolog\Handler\FailureLogMessageDetector;
-use Piwik\Version;
use Psr\Log\LoggerInterface;
use Symfony\Bridge\Monolog\Handler\ConsoleHandler;
use Symfony\Component\Console\Application;
diff --git a/core/CronArchive.php b/core/CronArchive.php
index 8b91161f6e..791583d97a 100644
--- a/core/CronArchive.php
+++ b/core/CronArchive.php
@@ -9,7 +9,6 @@
namespace Piwik;
use Exception;
-use Piwik\ArchiveProcessor\Parameters;
use Piwik\ArchiveProcessor\PluginsArchiver;
use Piwik\ArchiveProcessor\Rules;
use Piwik\Archiver\Request;
diff --git a/core/CronArchive/Performance/Logger.php b/core/CronArchive/Performance/Logger.php
index fe38900ffe..302968b99f 100644
--- a/core/CronArchive/Performance/Logger.php
+++ b/core/CronArchive/Performance/Logger.php
@@ -11,7 +11,6 @@ namespace Piwik\CronArchive\Performance;
use Piwik\ArchiveProcessor;
use Piwik\Common;
use Piwik\Config;
-use Piwik\Option;
use Piwik\Timer;
use Piwik\Url;
use Psr\Log\LoggerInterface;
diff --git a/core/DataAccess/ArchiveTableDao.php b/core/DataAccess/ArchiveTableDao.php
index 72a8ce0229..fa3680a8d7 100644
--- a/core/DataAccess/ArchiveTableDao.php
+++ b/core/DataAccess/ArchiveTableDao.php
@@ -9,7 +9,6 @@
namespace Piwik\DataAccess;
use Piwik\Common;
-use Piwik\Config;
use Piwik\Db;
/**
diff --git a/core/DataAccess/LogAggregator.php b/core/DataAccess/LogAggregator.php
index ae47677f1e..0bfc099476 100644
--- a/core/DataAccess/LogAggregator.php
+++ b/core/DataAccess/LogAggregator.php
@@ -11,19 +11,14 @@ namespace Piwik\DataAccess;
use Piwik\ArchiveProcessor\ArchivingStatus;
use Piwik\ArchiveProcessor\Parameters;
use Piwik\Common;
-use Piwik\Concurrency\Lock;
use Piwik\Config;
use Piwik\Container\StaticContainer;
use Piwik\DataArray;
use Piwik\Date;
use Piwik\Db;
-use Piwik\DbHelper;
use Piwik\Metrics;
-use Piwik\Period;
-use Piwik\Piwik;
use Piwik\Plugin\LogTablesProvider;
use Piwik\Segment;
-use Piwik\Segment\SegmentExpression;
use Piwik\Tracker\GoalManager;
use Psr\Log\LoggerInterface;
diff --git a/core/DataAccess/LogTableTemporary.php b/core/DataAccess/LogTableTemporary.php
index 8be027c114..388b49a0d6 100644
--- a/core/DataAccess/LogTableTemporary.php
+++ b/core/DataAccess/LogTableTemporary.php
@@ -8,9 +8,6 @@
namespace Piwik\DataAccess;
-use Piwik\Common;
-use Piwik\Config;
-use Piwik\Db;
use Piwik\Tracker\LogTable;
class LogTableTemporary extends LogTable
diff --git a/core/DataTable/Filter/AddSegmentValue.php b/core/DataTable/Filter/AddSegmentValue.php
index d01e5869d1..c71d5f8bc0 100644
--- a/core/DataTable/Filter/AddSegmentValue.php
+++ b/core/DataTable/Filter/AddSegmentValue.php
@@ -8,8 +8,6 @@
*/
namespace Piwik\DataTable\Filter;
-use Piwik\DataTable;
-
/**
* Executes a filter for each row of a {@link DataTable} and generates a segment filter for each row.
*
diff --git a/core/DataTable/Filter/Sort.php b/core/DataTable/Filter/Sort.php
index ba2a379813..392cfbb236 100644
--- a/core/DataTable/Filter/Sort.php
+++ b/core/DataTable/Filter/Sort.php
@@ -9,10 +9,8 @@
namespace Piwik\DataTable\Filter;
use Piwik\DataTable\BaseFilter;
-use Piwik\DataTable\Row;
use Piwik\DataTable\Simple;
use Piwik\DataTable;
-use Piwik\Metrics;
use Piwik\Metrics\Sorter;
/**
diff --git a/core/DataTable/Renderer.php b/core/DataTable/Renderer.php
index d1940d041d..02ae434f0d 100644
--- a/core/DataTable/Renderer.php
+++ b/core/DataTable/Renderer.php
@@ -11,7 +11,6 @@ namespace Piwik\DataTable;
use Exception;
use Piwik\Columns\Dimension;
use Piwik\Common;
-use Piwik\DataTable;
use Piwik\Metrics;
use Piwik\Piwik;
use Piwik\BaseFactory;
diff --git a/core/Date.php b/core/Date.php
index 01b503d6be..b436d91e1a 100644
--- a/core/Date.php
+++ b/core/Date.php
@@ -10,7 +10,6 @@
namespace Piwik;
use Exception;
-use Piwik\Common;
use Piwik\Container\StaticContainer;
use Piwik\Intl\Data\Provider\DateTimeFormatProvider;
diff --git a/core/Db/Schema/Mysql.php b/core/Db/Schema/Mysql.php
index a82931b64d..99dee5e334 100644
--- a/core/Db/Schema/Mysql.php
+++ b/core/Db/Schema/Mysql.php
@@ -16,7 +16,6 @@ use Piwik\Db\SchemaInterface;
use Piwik\Db;
use Piwik\DbHelper;
use Piwik\Option;
-use Piwik\Plugins\Installation\Installation;
use Piwik\Version;
/**
diff --git a/core/DeviceDetector/DeviceDetectorFactory.php b/core/DeviceDetector/DeviceDetectorFactory.php
index ce8b98bbd7..a498c371d8 100644
--- a/core/DeviceDetector/DeviceDetectorFactory.php
+++ b/core/DeviceDetector/DeviceDetectorFactory.php
@@ -10,7 +10,6 @@ namespace Piwik\DeviceDetector;
use DeviceDetector\DeviceDetector;
use Piwik\Common;
-use Piwik\Container\StaticContainer;
class DeviceDetectorFactory
{
diff --git a/core/DeviceDetectorFactory.php b/core/DeviceDetectorFactory.php
deleted file mode 100644
index 1d392cf955..0000000000
--- a/core/DeviceDetectorFactory.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-/**
- * Piwik - free/libre analytics platform
- *
- * @link https://matomo.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- *
- */
-namespace Piwik;
-
-use DeviceDetector\DeviceDetector;
-use Piwik\Container\StaticContainer;
-
-class DeviceDetectorFactory
-{
- /**
- * Returns a Singleton instance of DeviceDetector for the given user agent.
- * @param string $userAgent
- * @return DeviceDetector
- * @deprecated Should get a factory via StaticContainer and call makeInstance() on it instead
- */
- public static function getInstance($userAgent)
- {
- $factory = StaticContainer::get(\Piwik\DeviceDetector\DeviceDetectorFactory::class);
- return $factory->makeInstance($userAgent);
- }
-} \ No newline at end of file
diff --git a/core/Filesystem.php b/core/Filesystem.php
index e5b43086fd..e658f000f6 100644
--- a/core/Filesystem.php
+++ b/core/Filesystem.php
@@ -10,8 +10,6 @@ namespace Piwik;
use Piwik\Container\StaticContainer;
use Piwik\Exception\FailedCopyException;
-use Piwik\Exception\MissingFilePermissionException;
-use Piwik\Plugins\Installation\ServerFilesGenerator;
use Piwik\Tracker\Cache as TrackerCache;
use Piwik\Cache as PiwikCache;
use Piwik\Exception\Exception;
diff --git a/core/Http/ControllerResolver.php b/core/Http/ControllerResolver.php
index 20f1e14240..39f6ce953a 100644
--- a/core/Http/ControllerResolver.php
+++ b/core/Http/ControllerResolver.php
@@ -10,10 +10,8 @@ namespace Piwik\Http;
use DI\FactoryInterface;
use Exception;
-use Piwik\Plugin;
use Piwik\Plugin\Controller;
use Piwik\Plugin\ReportsProvider;
-use Piwik\Session;
use Piwik\Plugin\WidgetsProvider;
/**
diff --git a/core/Http/Router.php b/core/Http/Router.php
index ae8f8f13a2..df8b0843c2 100644
--- a/core/Http/Router.php
+++ b/core/Http/Router.php
@@ -8,8 +8,6 @@
namespace Piwik\Http;
-use Piwik\Url;
-
/**
* Router
*/
diff --git a/core/Mail.php b/core/Mail.php
index ddc2299445..9255b7c919 100644
--- a/core/Mail.php
+++ b/core/Mail.php
@@ -12,7 +12,6 @@ use Piwik\Container\StaticContainer;
use Piwik\Email\ContentGenerator;
use Piwik\Plugins\CoreAdminHome\CustomLogo;
use Piwik\Translation\Translator;
-use Piwik\View\HtmlReportEmailHeaderView;
use Zend_Mail;
/**
diff --git a/core/Menu/MenuAdmin.php b/core/Menu/MenuAdmin.php
index 4b61a542ff..c5c79a5e29 100644
--- a/core/Menu/MenuAdmin.php
+++ b/core/Menu/MenuAdmin.php
@@ -9,7 +9,6 @@
namespace Piwik\Menu;
use Piwik\Development;
-use Piwik\Piwik;
/**
* Contains menu entries for the Admin menu.
diff --git a/core/Menu/MenuTop.php b/core/Menu/MenuTop.php
index 434c112ae4..8ab26776da 100644
--- a/core/Menu/MenuTop.php
+++ b/core/Menu/MenuTop.php
@@ -8,8 +8,6 @@
*/
namespace Piwik\Menu;
-use Piwik\Piwik;
-
/**
* Contains menu entries for the Top menu (the menu at the very top of the page).
* Plugins can implement the `configureTopMenu()` method of the `Menu` plugin class to add, rename of remove
diff --git a/core/Metrics.php b/core/Metrics.php
index 63a04dfc8b..4649822a7b 100644
--- a/core/Metrics.php
+++ b/core/Metrics.php
@@ -9,7 +9,6 @@
namespace Piwik;
use Piwik\Cache as PiwikCache;
-use Piwik\Columns\MetricsList;
use Piwik\Container\StaticContainer;
require_once PIWIK_INCLUDE_PATH . "/core/Piwik.php";
diff --git a/core/Metrics/Sorter.php b/core/Metrics/Sorter.php
index 422d0ed1ab..9d4c1b4d30 100644
--- a/core/Metrics/Sorter.php
+++ b/core/Metrics/Sorter.php
@@ -11,7 +11,6 @@ use Piwik\DataTable;
use Piwik\DataTable\Row;
use Piwik\Metrics;
use Piwik\Plugin\Metric;
-use Piwik\Plugin\Report;
class Sorter
{
diff --git a/core/MetricsFormatter.php b/core/MetricsFormatter.php
index 9a039fd796..a080afadc4 100644
--- a/core/MetricsFormatter.php
+++ b/core/MetricsFormatter.php
@@ -64,13 +64,4 @@ class MetricsFormatter
{
return Site::getCurrencySymbolFor($idSite);
}
-
- /**
- * @deprecated Use Piwik\Intl\Data\Provider\CurrencyDataProvider instead.
- * @see \Piwik\Intl\Data\Provider\CurrencyDataProvider::getCurrencyList()
- */
- public static function getCurrencyList()
- {
- return Site::getCurrencyList();
- }
}
diff --git a/core/Piwik.php b/core/Piwik.php
index bf98a9df9b..285557ea47 100644
--- a/core/Piwik.php
+++ b/core/Piwik.php
@@ -336,20 +336,6 @@ class Piwik
}
/**
- * Helper method user to set the current as superuser.
- * This should be used with great care as this gives the user all permissions.
- *
- * This method is deprecated, use {@link Access::doAsSuperUser()} instead.
- *
- * @param bool $bool true to set current user as Super User
- * @deprecated
- */
- public static function setUserHasSuperUserAccess($bool = true)
- {
- Access::getInstance()->setSuperUserAccess($bool);
- }
-
- /**
* Check that the current user has superuser access.
*
* @throws Exception if the current user is not the superuser.
diff --git a/core/Plugin.php b/core/Plugin.php
index 09a3ab98df..092c28b3cf 100644
--- a/core/Plugin.php
+++ b/core/Plugin.php
@@ -8,7 +8,6 @@
*/
namespace Piwik;
-use Piwik\Container\StaticContainer;
use Piwik\Plugin\Dependency;
use Piwik\Plugin\Manager;
use Piwik\Plugin\MetadataLoader;
diff --git a/core/Plugin/ArchivedMetric.php b/core/Plugin/ArchivedMetric.php
index 656caeab15..befb126b83 100644
--- a/core/Plugin/ArchivedMetric.php
+++ b/core/Plugin/ArchivedMetric.php
@@ -11,7 +11,6 @@ use Piwik\Archive\DataTableFactory;
use Piwik\Columns\Dimension;
use Piwik\Common;
use Piwik\DataTable;
-use Piwik\DataTable\Row;
use Piwik\Metrics\Formatter;
use Piwik\Piwik;
diff --git a/core/Plugin/Controller.php b/core/Plugin/Controller.php
index 84942b3f2d..986cdae1b3 100644
--- a/core/Plugin/Controller.php
+++ b/core/Plugin/Controller.php
@@ -15,7 +15,6 @@ use Piwik\API\Request;
use Piwik\Common;
use Piwik\Config as PiwikConfig;
use Piwik\Container\StaticContainer;
-use Piwik\DataTable\Filter\SafeDecodeLabel;
use Piwik\Date;
use Piwik\Exception\NoPrivilegesException;
use Piwik\Exception\NoWebsiteFoundException;
diff --git a/core/Plugin/Manager.php b/core/Plugin/Manager.php
index c10f5a189b..63cc0b548e 100644
--- a/core/Plugin/Manager.php
+++ b/core/Plugin/Manager.php
@@ -18,7 +18,6 @@ use Piwik\Config as PiwikConfig;
use Piwik\Container\StaticContainer;
use Piwik\Development;
use Piwik\EventDispatcher;
-use Piwik\Exception\Exception;
use Piwik\Exception\PluginDeactivatedException;
use Piwik\Filesystem;
use Piwik\Log;
diff --git a/core/Plugin/ViewDataTable.php b/core/Plugin/ViewDataTable.php
index 2cb2837b6f..bdd071489a 100644
--- a/core/Plugin/ViewDataTable.php
+++ b/core/Plugin/ViewDataTable.php
@@ -15,8 +15,6 @@ use Piwik\DataTable;
use Piwik\Period;
use Piwik\Piwik;
use Piwik\Plugins\API\Filter\DataComparisonFilter;
-use Piwik\Plugins\CoreVisualizations\Visualizations\Sparkline;
-use Piwik\View;
use Piwik\View\ViewInterface;
use Piwik\ViewDataTable\Config as VizConfig;
use Piwik\ViewDataTable\Manager as ViewDataTableManager;
diff --git a/core/Plugin/WidgetsProvider.php b/core/Plugin/WidgetsProvider.php
index 9763b6c560..66c3406034 100644
--- a/core/Plugin/WidgetsProvider.php
+++ b/core/Plugin/WidgetsProvider.php
@@ -11,7 +11,6 @@ namespace Piwik\Plugin;
use Piwik\Container\StaticContainer;
use Piwik\Piwik;
use Piwik\Plugin;
-use Exception;
use Piwik\Widget\Widget;
use Piwik\Widget\WidgetConfig;
use Piwik\Widget\WidgetContainerConfig;
diff --git a/core/Registry.php b/core/Registry.php
deleted file mode 100644
index 09fc0131bf..0000000000
--- a/core/Registry.php
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-/**
- * Piwik - free/libre analytics platform
- *
- * @link https://matomo.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */
-
-namespace Piwik;
-
-use Piwik\Container\StaticContainer;
-
-/**
- * Registry class.
- *
- * @method static Registry getInstance()
- * @api
- * @deprecated This class will be removed, use the container instead.
- */
-class Registry extends Singleton
-{
- public static function isRegistered($key)
- {
- return self::getInstance()->hasKey($key);
- }
-
- public static function get($key)
- {
- return self::getInstance()->getKey($key);
- }
-
- public static function set($key, $value)
- {
- self::getInstance()->setKey($key, $value);
- }
-
- public function setKey($key, $value)
- {
- if ($key === 'auth') {
- $key = 'Piwik\Auth';
- }
-
- StaticContainer::getContainer()->set($key, $value);
- }
-
- public function getKey($key)
- {
- if ($key === 'auth') {
- $key = 'Piwik\Auth';
- }
-
- return StaticContainer::get($key);
- }
-
- public function hasKey($key)
- {
- if ($key === 'auth') {
- $key = 'Piwik\Auth';
- }
-
- return StaticContainer::getContainer()->has($key);
- }
-}
diff --git a/core/Session/SaveHandler/DbTable.php b/core/Session/SaveHandler/DbTable.php
index 70b3beff48..15163c463e 100644
--- a/core/Session/SaveHandler/DbTable.php
+++ b/core/Session/SaveHandler/DbTable.php
@@ -9,7 +9,6 @@
namespace Piwik\Session\SaveHandler;
-use Piwik\Common;
use Piwik\Db;
use Piwik\DbHelper;
use Exception;
diff --git a/core/Settings/Measurable/MeasurableProperty.php b/core/Settings/Measurable/MeasurableProperty.php
index 7ff7d889b4..f2fcfa492b 100644
--- a/core/Settings/Measurable/MeasurableProperty.php
+++ b/core/Settings/Measurable/MeasurableProperty.php
@@ -11,7 +11,6 @@ namespace Piwik\Settings\Measurable;
use Piwik\Container\StaticContainer;
use Piwik\Piwik;
-use Piwik\Settings\Storage;
use Exception;
/**
diff --git a/core/Settings/Measurable/MeasurableSetting.php b/core/Settings/Measurable/MeasurableSetting.php
index d1464e682b..19507c4c13 100644
--- a/core/Settings/Measurable/MeasurableSetting.php
+++ b/core/Settings/Measurable/MeasurableSetting.php
@@ -11,7 +11,6 @@ namespace Piwik\Settings\Measurable;
use Piwik\Container\StaticContainer;
use Piwik\Piwik;
-use Piwik\Settings\Storage;
/**
* Describes a Measurable setting for a measurable type such as a website, a mobile app, ...
diff --git a/core/Settings/Measurable/MeasurableSettings.php b/core/Settings/Measurable/MeasurableSettings.php
index 89cf9aeb94..8096c27903 100644
--- a/core/Settings/Measurable/MeasurableSettings.php
+++ b/core/Settings/Measurable/MeasurableSettings.php
@@ -8,10 +8,8 @@
*/
namespace Piwik\Settings\Measurable;
-use Piwik\Db;
use Piwik\Piwik;
use Piwik\Settings\Settings;
-use Piwik\Settings\Storage;
use Piwik\Site;
use Exception;
diff --git a/core/Settings/Plugin/SystemConfigSetting.php b/core/Settings/Plugin/SystemConfigSetting.php
index 1f7953542c..c5ee3adfb5 100644
--- a/core/Settings/Plugin/SystemConfigSetting.php
+++ b/core/Settings/Plugin/SystemConfigSetting.php
@@ -9,11 +9,9 @@
namespace Piwik\Settings\Plugin;
-use Piwik\Config;
use Piwik\Container\StaticContainer;
use Piwik\Piwik;
use Piwik\Settings\Setting;
-use Piwik\Settings\Storage;
/**
* Describes a system wide setting. Only the Super User can change this type of setting by d efault and
diff --git a/core/Settings/Plugin/SystemSetting.php b/core/Settings/Plugin/SystemSetting.php
index 6c5eb28eb3..305aaff18d 100644
--- a/core/Settings/Plugin/SystemSetting.php
+++ b/core/Settings/Plugin/SystemSetting.php
@@ -13,7 +13,6 @@ use Piwik\Config;
use Piwik\Container\StaticContainer;
use Piwik\Piwik;
use Piwik\Settings\Setting;
-use Piwik\Settings\Storage;
/**
* Describes a system wide setting. Only the Super User can change this type of setting by default and
diff --git a/core/Settings/Plugin/SystemSettings.php b/core/Settings/Plugin/SystemSettings.php
index 9dafa19af1..bff43a4a19 100644
--- a/core/Settings/Plugin/SystemSettings.php
+++ b/core/Settings/Plugin/SystemSettings.php
@@ -8,10 +8,8 @@
*/
namespace Piwik\Settings\Plugin;
-use Piwik\Db;
use Piwik\Piwik;
use Piwik\Settings\Settings;
-use Piwik\Settings\Storage;
/**
* Base class of all system settings providers. Plugins that define their own configuration settings
diff --git a/core/Settings/Plugin/UserSetting.php b/core/Settings/Plugin/UserSetting.php
index 68499529b7..4cc9a543ee 100644
--- a/core/Settings/Plugin/UserSetting.php
+++ b/core/Settings/Plugin/UserSetting.php
@@ -10,11 +10,9 @@
namespace Piwik\Settings\Plugin;
use Piwik\Container\StaticContainer;
-use Piwik\Db;
use Piwik\Piwik;
use Exception;
use Piwik\Settings\Setting;
-use Piwik\Settings\Storage;
/**
* Describes a per user setting. Each user will be able to change this setting for themselves,
diff --git a/core/Settings/Plugin/UserSettings.php b/core/Settings/Plugin/UserSettings.php
index 3320f8ecbd..d38ec1f19e 100644
--- a/core/Settings/Plugin/UserSettings.php
+++ b/core/Settings/Plugin/UserSettings.php
@@ -8,10 +8,8 @@
*/
namespace Piwik\Settings\Plugin;
-use Piwik\Db;
use Piwik\Piwik;
use Piwik\Settings\Settings;
-use Piwik\Settings\Storage;
/**
* Base class of all plugin settings providers. Plugins that define their own configuration settings
diff --git a/core/Settings/Storage/Backend/Cache.php b/core/Settings/Storage/Backend/Cache.php
index d8646929fd..b751bdb27f 100644
--- a/core/Settings/Storage/Backend/Cache.php
+++ b/core/Settings/Storage/Backend/Cache.php
@@ -9,7 +9,6 @@
namespace Piwik\Settings\Storage\Backend;
-use Piwik\Settings\Storage;
use Piwik\Tracker;
use Piwik\Cache as PiwikCache;
diff --git a/core/Settings/Storage/Backend/MeasurableSettingsTable.php b/core/Settings/Storage/Backend/MeasurableSettingsTable.php
index 77c56150fc..5ef9a90cb3 100644
--- a/core/Settings/Storage/Backend/MeasurableSettingsTable.php
+++ b/core/Settings/Storage/Backend/MeasurableSettingsTable.php
@@ -10,11 +10,8 @@
namespace Piwik\Settings\Storage\Backend;
use Piwik\Common;
-use Piwik\Concurrency\Lock;
-use Piwik\Container\StaticContainer;
use Piwik\Db;
use Exception;
-use Piwik\Version;
/**
* Measurable settings backend. Stores all settings in a "site_setting" database table.
diff --git a/core/Settings/Storage/Backend/NullBackend.php b/core/Settings/Storage/Backend/NullBackend.php
index 69262ed21f..3c89ec1367 100644
--- a/core/Settings/Storage/Backend/NullBackend.php
+++ b/core/Settings/Storage/Backend/NullBackend.php
@@ -9,8 +9,6 @@
namespace Piwik\Settings\Storage\Backend;
-use Piwik\Settings\Storage;
-
/**
* Static / temporary storage where a value shall never be persisted. Meaning it will use the default value
* for each request until configured differently. Useful for tests etc.
diff --git a/core/Settings/Storage/Backend/PluginSettingsTable.php b/core/Settings/Storage/Backend/PluginSettingsTable.php
index fddd60fc36..d6255a5180 100644
--- a/core/Settings/Storage/Backend/PluginSettingsTable.php
+++ b/core/Settings/Storage/Backend/PluginSettingsTable.php
@@ -10,11 +10,8 @@
namespace Piwik\Settings\Storage\Backend;
use Piwik\Common;
-use Piwik\Concurrency\Lock;
-use Piwik\Container\StaticContainer;
use Piwik\Db;
use Exception;
-use Piwik\Version;
/**
* Plugin settings backend. Stores all settings in a "plugin_setting" database table.
diff --git a/core/Site.php b/core/Site.php
index 2323dd249c..2ad385b40e 100644
--- a/core/Site.php
+++ b/core/Site.php
@@ -10,9 +10,7 @@
namespace Piwik;
use Exception;
-use Piwik\Container\StaticContainer;
use Piwik\Exception\UnexpectedWebsiteFoundException;
-use Piwik\Intl\Data\Provider\CurrencyDataProvider;
use Piwik\Plugins\SitesManager\API;
/**
@@ -630,24 +628,6 @@ class Site
return $symbol;
}
-
- /**
- * Returns the list of all known currency symbols.
- *
- * @return array An array mapping currency codes to their respective currency symbols
- * and a description, eg, `array('USD' => array('$', 'US dollar'))`.
- *
- * @deprecated Use Piwik\Intl\Data\Provider\CurrencyDataProvider instead.
- * @see \Piwik\Intl\Data\Provider\CurrencyDataProvider::getCurrencyList()
- * @api
- */
- public static function getCurrencyList()
- {
- /** @var CurrencyDataProvider $dataProvider */
- $dataProvider = StaticContainer::get('Piwik\Intl\Data\Provider\CurrencyDataProvider');
- return $dataProvider->getCurrencyList();
- }
-
/**
* Returns the excluded IP addresses of the site with the specified ID.
*
diff --git a/core/TaskScheduler.php b/core/TaskScheduler.php
deleted file mode 100644
index 211b720d68..0000000000
--- a/core/TaskScheduler.php
+++ /dev/null
@@ -1,120 +0,0 @@
-<?php
-/**
- * Piwik - free/libre analytics platform
- *
- * @link https://matomo.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- *
- */
-
-namespace Piwik;
-
-use Piwik\Container\StaticContainer;
-use Piwik\Scheduler\Scheduler;
-use Piwik\Scheduler\Task;
-
-// When set to true, all scheduled tasks will be triggered in all requests (careful!)
-//define('DEBUG_FORCE_SCHEDULED_TASKS', true);
-
-/**
- * Manages scheduled task execution.
- *
- * A scheduled task is a callback that should be executed every so often (such as daily,
- * weekly, monthly, etc.). They are registered by extending {@link \Piwik\Plugin\Tasks}.
- *
- * Tasks are executed when the `core:archive` command is executed.
- *
- * ### Examples
- *
- * **Scheduling a task**
- *
- * class Tasks extends \Piwik\Plugin\Tasks
- * {
- * public function schedule()
- * {
- * $this->hourly('myTask'); // myTask() will be executed once every hour
- * }
- * public function myTask()
- * {
- * // do something
- * }
- * }
- *
- * **Executing all pending tasks**
- *
- * $results = TaskScheduler::runTasks();
- * $task1Result = $results[0];
- * $task1Name = $task1Result['task'];
- * $task1Output = $task1Result['output'];
- *
- * echo "Executed task '$task1Name'. Task output:\n$task1Output";
- *
- * @deprecated Use Piwik\Scheduler\Scheduler instead
- * @see \Piwik\Scheduler\Scheduler
- */
-class TaskScheduler
-{
- /**
- * Executes tasks that are scheduled to run, then reschedules them.
- *
- * @return array An array describing the results of scheduled task execution. Each element
- * in the array will have the following format:
- *
- * ```
- * array(
- * 'task' => 'task name',
- * 'output' => '... task output ...'
- * )
- * ```
- */
- public static function runTasks()
- {
- return self::getInstance()->run();
- }
-
- /**
- * Determines a task's scheduled time and persists it, overwriting the previous scheduled time.
- *
- * Call this method if your task's scheduled time has changed due to, for example, an option that
- * was changed.
- *
- * @param Task $task Describes the scheduled task being rescheduled.
- * @api
- */
- public static function rescheduleTask(Task $task)
- {
- self::getInstance()->rescheduleTask($task);
- }
-
- /**
- * Returns true if the TaskScheduler is currently running a scheduled task.
- *
- * @return bool
- */
- public static function isTaskBeingExecuted()
- {
- return self::getInstance()->isRunningTask();
- }
-
- /**
- * Return the next scheduled time given the class and method names of a scheduled task.
- *
- * @param string $className The name of the class that contains the scheduled task method.
- * @param string $methodName The name of the scheduled task method.
- * @param string|null $methodParameter Optional method parameter.
- * @return mixed int|bool The time in miliseconds when the scheduled task will be executed
- * next or false if it is not scheduled to run.
- */
- public static function getScheduledTimeForMethod($className, $methodName, $methodParameter = null)
- {
- return self::getInstance()->getScheduledTimeForMethod($className, $methodName, $methodParameter);
- }
-
- /**
- * @return Scheduler
- */
- private static function getInstance()
- {
- return StaticContainer::getContainer()->get('Piwik\Scheduler\Scheduler');
- }
-}
diff --git a/core/Tracker/Action.php b/core/Tracker/Action.php
index d0caddcdc3..17efcf9127 100644
--- a/core/Tracker/Action.php
+++ b/core/Tracker/Action.php
@@ -12,10 +12,8 @@ namespace Piwik\Tracker;
use Exception;
use Piwik\Common;
use Piwik\Container\StaticContainer;
-use Piwik\Piwik;
use Piwik\Plugin\Dimension\ActionDimension;
use Piwik\Plugin\Manager;
-use Piwik\Tracker;
use Psr\Log\LoggerInterface;
/**
diff --git a/core/Tracker/Cache.php b/core/Tracker/Cache.php
index f20223d234..d1fde4aec6 100644
--- a/core/Tracker/Cache.php
+++ b/core/Tracker/Cache.php
@@ -11,7 +11,6 @@ namespace Piwik\Tracker;
use Piwik\Access;
use Piwik\ArchiveProcessor\Rules;
use Piwik\Cache as PiwikCache;
-use Piwik\Common;
use Piwik\Config;
use Piwik\Container\StaticContainer;
use Piwik\Option;
diff --git a/core/Tracker/Db.php b/core/Tracker/Db.php
index c3d1eeb987..5c92f5a6de 100644
--- a/core/Tracker/Db.php
+++ b/core/Tracker/Db.php
@@ -14,10 +14,7 @@ use Piwik\Common;
use Piwik\Config;
use Piwik\Piwik;
use Piwik\Timer;
-use Piwik\Tracker;
use Piwik\Tracker\Db\DbException;
-use Piwik\Tracker\Db\Mysqli;
-use Piwik\Tracker\Db\Pdo\Mysql;
/**
* Simple database wrapper.
diff --git a/core/Tracker/GoalManager.php b/core/Tracker/GoalManager.php
index 5353e68a8f..d04344e55a 100644
--- a/core/Tracker/GoalManager.php
+++ b/core/Tracker/GoalManager.php
@@ -18,7 +18,6 @@ use Piwik\Plugin\Dimension\ConversionDimension;
use Piwik\Plugin\Dimension\VisitDimension;
use Piwik\Plugins\CustomVariables\CustomVariables;
use Piwik\Plugins\Events\Actions\ActionEvent;
-use Piwik\Tracker;
use Piwik\Tracker\Visit\VisitProperties;
/**
diff --git a/core/Tracker/Handler.php b/core/Tracker/Handler.php
index f4c9fa9339..9865e3f844 100644
--- a/core/Tracker/Handler.php
+++ b/core/Tracker/Handler.php
@@ -9,7 +9,6 @@
namespace Piwik\Tracker;
-use Piwik\Common;
use Piwik\Container\StaticContainer;
use Piwik\Exception\InvalidRequestParameterException;
use Piwik\Exception\UnexpectedWebsiteFoundException;
diff --git a/core/Tracker/Settings.php b/core/Tracker/Settings.php
index 6db7b998d3..78c889c40e 100644
--- a/core/Tracker/Settings.php
+++ b/core/Tracker/Settings.php
@@ -8,7 +8,6 @@
*/
namespace Piwik\Tracker;
-use Piwik\Config;
use Piwik\Container\StaticContainer;
use Piwik\Tracker;
use Piwik\DeviceDetector\DeviceDetectorFactory;
diff --git a/core/Tracker/TableLogAction.php b/core/Tracker/TableLogAction.php
index fb6ef52464..834f275312 100644
--- a/core/Tracker/TableLogAction.php
+++ b/core/Tracker/TableLogAction.php
@@ -10,7 +10,6 @@
namespace Piwik\Tracker;
use Piwik\Common;
-use Piwik\Config;
use Piwik\Container\StaticContainer;
use Piwik\Segment\SegmentExpression;
diff --git a/core/Tracker/TrackerCodeGenerator.php b/core/Tracker/TrackerCodeGenerator.php
index 9d7e87c62b..343052bdcb 100644
--- a/core/Tracker/TrackerCodeGenerator.php
+++ b/core/Tracker/TrackerCodeGenerator.php
@@ -10,7 +10,6 @@ namespace Piwik\Tracker;
use Piwik\Common;
use Piwik\DbHelper;
-use Piwik\Option;
use Piwik\Piwik;
use Piwik\Plugins\CustomVariables\CustomVariables;
use Piwik\Plugins\SitesManager\API as APISitesManager;
diff --git a/core/Tracker/TrackerConfig.php b/core/Tracker/TrackerConfig.php
index 3f027201b7..99ffbbfa86 100644
--- a/core/Tracker/TrackerConfig.php
+++ b/core/Tracker/TrackerConfig.php
@@ -9,7 +9,6 @@
namespace Piwik\Tracker;
use Piwik\Config;
-use Piwik\Tracker;
class TrackerConfig
{
diff --git a/core/Tracker/Visitor.php b/core/Tracker/Visitor.php
index 8203915dc2..284eaf7048 100644
--- a/core/Tracker/Visitor.php
+++ b/core/Tracker/Visitor.php
@@ -8,8 +8,6 @@
*/
namespace Piwik\Tracker;
-use Piwik\Config;
-use Piwik\Tracker;
use Piwik\Tracker\Visit\VisitProperties;
class Visitor
diff --git a/core/Translation/Translator.php b/core/Translation/Translator.php
index 91950a4af4..4d8f6932c6 100644
--- a/core/Translation/Translator.php
+++ b/core/Translation/Translator.php
@@ -10,7 +10,6 @@ namespace Piwik\Translation;
use Piwik\Config;
use Piwik\Piwik;
-use Piwik\Plugin;
use Piwik\Translation\Loader\LoaderInterface;
/**
diff --git a/core/Updater.php b/core/Updater.php
index 8eaa4186f5..3057506fc3 100644
--- a/core/Updater.php
+++ b/core/Updater.php
@@ -13,7 +13,6 @@ use Piwik\Container\StaticContainer;
use Piwik\Plugin\Manager;
use Piwik\Plugins\Installation\ServerFilesGenerator;
use Piwik\Updater\Migration;
-use Piwik\Updater\Migration\Db\Sql;
use Piwik\Exception\MissingFilePermissionException;
use Piwik\Updater\UpdateObserver;
use Zend_Db_Exception;
diff --git a/core/Updater/Migration.php b/core/Updater/Migration.php
index 6a6fa3a8e2..b6009bb4b7 100644
--- a/core/Updater/Migration.php
+++ b/core/Updater/Migration.php
@@ -7,7 +7,6 @@
*/
namespace Piwik\Updater;
-use Piwik\Db;
use Exception;
/**
diff --git a/core/Updater/Migration/Db/DropIndex.php b/core/Updater/Migration/Db/DropIndex.php
index 5f6c98ebff..c1509b8ad4 100644
--- a/core/Updater/Migration/Db/DropIndex.php
+++ b/core/Updater/Migration/Db/DropIndex.php
@@ -7,8 +7,6 @@
*/
namespace Piwik\Updater\Migration\Db;
-use Piwik\Db;
-
/**
* @see Factory::dropIndex()
* @ignore
diff --git a/core/Updater/Migration/Db/DropTable.php b/core/Updater/Migration/Db/DropTable.php
index 63c6567390..84e71c38f1 100644
--- a/core/Updater/Migration/Db/DropTable.php
+++ b/core/Updater/Migration/Db/DropTable.php
@@ -7,8 +7,6 @@
*/
namespace Piwik\Updater\Migration\Db;
-use Piwik\Db;
-
/**
* @see Factory::dropTable()
* @ignore
diff --git a/core/Updater/Migration/Db/Insert.php b/core/Updater/Migration/Db/Insert.php
index 0867129227..d4453fe386 100644
--- a/core/Updater/Migration/Db/Insert.php
+++ b/core/Updater/Migration/Db/Insert.php
@@ -7,7 +7,6 @@
*/
namespace Piwik\Updater\Migration\Db;
use Piwik\Common;
-use Piwik\Db;
/**
* @see Factory::insert()
diff --git a/core/Updater/Migration/Db/Sql.php b/core/Updater/Migration/Db/Sql.php
index 4510075008..fad808054a 100644
--- a/core/Updater/Migration/Db/Sql.php
+++ b/core/Updater/Migration/Db/Sql.php
@@ -8,7 +8,6 @@
namespace Piwik\Updater\Migration\Db;
use Piwik\Common;
use Piwik\Db;
-use Piwik\Updater\Migration as MigrationInterface;
use Piwik\Updater\Migration\Db as DbMigration;
/**
diff --git a/core/Updater/Migration/Factory.php b/core/Updater/Migration/Factory.php
index 776e889bee..3c4cc36e92 100644
--- a/core/Updater/Migration/Factory.php
+++ b/core/Updater/Migration/Factory.php
@@ -7,8 +7,6 @@
*/
namespace Piwik\Updater\Migration;
-use Interop\Container\ContainerInterface;
-use Piwik\Common;
use Piwik\Updater\Migration\Db\Factory as DbFactory;
use Piwik\Updater\Migration\Plugin\Factory as PluginFactory;
diff --git a/core/Updates/1.5-b1.php b/core/Updates/1.5-b1.php
index 5ba1204f9b..abec02aeac 100644
--- a/core/Updates/1.5-b1.php
+++ b/core/Updates/1.5-b1.php
@@ -9,7 +9,6 @@
namespace Piwik\Updates;
-use Piwik\Common;
use Piwik\Updater;
use Piwik\Updates;
use Piwik\Updater\Migration\Factory as MigrationFactory;
diff --git a/core/Updates/2.10.0-b5.php b/core/Updates/2.10.0-b5.php
index d33cbac760..328502a540 100644
--- a/core/Updates/2.10.0-b5.php
+++ b/core/Updates/2.10.0-b5.php
@@ -11,7 +11,6 @@ namespace Piwik\Updates;
use Piwik\Common;
use Piwik\DataAccess\ArchiveTableCreator;
-use Piwik\DataTable;
use Piwik\Db;
use Piwik\Updater;
use Piwik\Updates;
diff --git a/core/Updates/2.14.0-b2.php b/core/Updates/2.14.0-b2.php
index 5a7af21b98..22335d3972 100644
--- a/core/Updates/2.14.0-b2.php
+++ b/core/Updates/2.14.0-b2.php
@@ -11,7 +11,6 @@ namespace Piwik\Updates;
use Piwik\Updater;
use Piwik\Updates;
-use Piwik\Db;
use Piwik\Updater\Migration\Factory as MigrationFactory;
class Updates_2_14_0_b2 extends Updates
diff --git a/core/Updates/2.14.2.php b/core/Updates/2.14.2.php
index 4cbcc452bd..b2fbe91c4d 100644
--- a/core/Updates/2.14.2.php
+++ b/core/Updates/2.14.2.php
@@ -15,7 +15,6 @@ use Piwik\Option;
use Piwik\Plugin\Dimension\ActionDimension;
use Piwik\Plugin\Dimension\ConversionDimension;
use Piwik\Plugin\Dimension\VisitDimension;
-use Piwik\Tracker\Visit;
use Piwik\Updater;
use Piwik\Updates;
use Piwik\Updater\Migration\Factory as MigrationFactory;
diff --git a/core/Updates/2.15.0-b12.php b/core/Updates/2.15.0-b12.php
index 21265a7e6a..24d2fa1bbf 100644
--- a/core/Updates/2.15.0-b12.php
+++ b/core/Updates/2.15.0-b12.php
@@ -9,7 +9,6 @@
namespace Piwik\Updates;
use Piwik\Config;
-use Piwik\UpdateCheck;
use Piwik\Updater;
use Piwik\Updates;
diff --git a/core/Updates/2.16.3-rc2.php b/core/Updates/2.16.3-rc2.php
index 42e8bb749d..0b90ddfee8 100644
--- a/core/Updates/2.16.3-rc2.php
+++ b/core/Updates/2.16.3-rc2.php
@@ -8,10 +8,6 @@
*/
namespace Piwik\Updates;
-use Piwik\Plugins\ScheduledReports\API as ScheduledReportsAPI;
-use Piwik\Plugins\ScheduledReports\Model as ScheduledReportsModel;
-use Piwik\Site;
-use Piwik\Updater;
use Piwik\Updates as PiwikUpdates;
/**
diff --git a/core/Updates/3.0.0-b3.php b/core/Updates/3.0.0-b3.php
index a9e23f7ffd..44f652e409 100644
--- a/core/Updates/3.0.0-b3.php
+++ b/core/Updates/3.0.0-b3.php
@@ -12,7 +12,6 @@ namespace Piwik\Updates;
use Piwik\Config;
use Piwik\Plugin;
use Piwik\Updater;
-use Piwik\Updates as PiwikUpdates;
use Piwik\Updates;
class Updates_3_0_0_b3 extends Updates
diff --git a/core/Updates/3.10.0-b2.php b/core/Updates/3.10.0-b2.php
index e67490b6c0..1625a1db0a 100644
--- a/core/Updates/3.10.0-b2.php
+++ b/core/Updates/3.10.0-b2.php
@@ -11,7 +11,6 @@ namespace Piwik\Updates;
use Piwik\Updater;
use Piwik\Updates as PiwikUpdates;
-use Piwik\Updater\Migration;
use Piwik\Updater\Migration\Factory as MigrationFactory;
/**
diff --git a/core/Updates/3.11.0-b1.php b/core/Updates/3.11.0-b1.php
index 0fbe7b5000..e72a7d2570 100644
--- a/core/Updates/3.11.0-b1.php
+++ b/core/Updates/3.11.0-b1.php
@@ -11,7 +11,6 @@ namespace Piwik\Updates;
use Piwik\Updater;
use Piwik\Updates as PiwikUpdates;
-use Piwik\Updater\Migration;
use Piwik\Updater\Migration\Factory as MigrationFactory;
/**
diff --git a/core/Updates/3.12.0-b1.php b/core/Updates/3.12.0-b1.php
index 347a588946..75bcf381c8 100644
--- a/core/Updates/3.12.0-b1.php
+++ b/core/Updates/3.12.0-b1.php
@@ -11,7 +11,6 @@ namespace Piwik\Updates;
use Piwik\Updater;
use Piwik\Updates as PiwikUpdates;
-use Piwik\Updater\Migration;
use Piwik\Updater\Migration\Factory as MigrationFactory;
/**
diff --git a/core/Updates/3.5.1-b1.php b/core/Updates/3.5.1-b1.php
index 94a674d2f8..372b260869 100644
--- a/core/Updates/3.5.1-b1.php
+++ b/core/Updates/3.5.1-b1.php
@@ -12,7 +12,6 @@ namespace Piwik\Updates;
use Piwik\Filesystem;
use Piwik\Notification;
use Piwik\Plugin\Manager;
-use Piwik\SettingsServer;
use Piwik\Updater;
use Piwik\Updates as PiwikUpdates;
diff --git a/core/Updates/3.6.0-b3.php b/core/Updates/3.6.0-b3.php
index df68234600..47210592ec 100644
--- a/core/Updates/3.6.0-b3.php
+++ b/core/Updates/3.6.0-b3.php
@@ -9,7 +9,6 @@
namespace Piwik\Updates;
-use Piwik\Common;
use Piwik\Updater\Migration\Factory as MigrationFactory;
use Piwik\Updater;
use Piwik\Updates;
diff --git a/core/Updates/3.6.1-b2.php b/core/Updates/3.6.1-b2.php
index 6014e35bb6..d279a51808 100644
--- a/core/Updates/3.6.1-b2.php
+++ b/core/Updates/3.6.1-b2.php
@@ -9,7 +9,6 @@
namespace Piwik\Updates;
-use Piwik\Common;
use Piwik\Updater\Migration\Factory as MigrationFactory;
use Piwik\Updates;
use Piwik\Updater;
diff --git a/core/Updates/3.8.0-b3.php b/core/Updates/3.8.0-b3.php
index 0455683138..93a29a94a2 100644
--- a/core/Updates/3.8.0-b3.php
+++ b/core/Updates/3.8.0-b3.php
@@ -16,7 +16,6 @@ use Piwik\Plugin;
use Piwik\Updater;
use Piwik\Updates as PiwikUpdates;
use Piwik\Updater\Migration\Factory as MigrationFactory;
-use Piwik\Plugins\UsersManager\Model;
class Updates_3_8_0_b3 extends PiwikUpdates
{
diff --git a/core/Updates/4.0.0-b1.php b/core/Updates/4.0.0-b1.php
index 56bf173c80..71b8bc32db 100644
--- a/core/Updates/4.0.0-b1.php
+++ b/core/Updates/4.0.0-b1.php
@@ -11,7 +11,6 @@ namespace Piwik\Updates;
use Piwik\Updater;
use Piwik\Updates as PiwikUpdates;
-use Piwik\Updater\Migration;
use Piwik\Updater\Migration\Factory as MigrationFactory;
/**
diff --git a/core/Validators/IdSite.php b/core/Validators/IdSite.php
index 99ef3e382e..bcb71b2eac 100644
--- a/core/Validators/IdSite.php
+++ b/core/Validators/IdSite.php
@@ -9,9 +9,7 @@
namespace Piwik\Validators;
-use Piwik\Piwik;
use Piwik\Site;
-use Piwik\UrlHelper;
class IdSite extends BaseValidator
{
diff --git a/core/View.php b/core/View.php
index 1424736fc4..d59ac66970 100644
--- a/core/View.php
+++ b/core/View.php
@@ -11,7 +11,6 @@ namespace Piwik;
use Exception;
use Piwik\AssetManager\UIAssetCacheBuster;
use Piwik\Container\StaticContainer;
-use Piwik\Plugins\UsersManager\API as APIUsersManager;
use Piwik\View\ViewInterface;
use Twig_Environment;
diff --git a/core/ViewDataTable/Request.php b/core/ViewDataTable/Request.php
index 265d057de4..c582d702cd 100644
--- a/core/ViewDataTable/Request.php
+++ b/core/ViewDataTable/Request.php
@@ -11,8 +11,6 @@ namespace Piwik\ViewDataTable;
use Piwik\API\Request as ApiRequest;
use Piwik\Common;
-use Piwik\DataTable;
-use Piwik\Period;
class Request
{
diff --git a/core/Widget/WidgetsList.php b/core/Widget/WidgetsList.php
index 6636c605d8..6f998071f4 100644
--- a/core/Widget/WidgetsList.php
+++ b/core/Widget/WidgetsList.php
@@ -8,7 +8,6 @@
*/
namespace Piwik\Widget;
-use Piwik\Cache as PiwikCache;
use Piwik\Container\StaticContainer;
use Piwik\Development;
use Piwik\Piwik;
diff --git a/plugins/Goals/tests/Integration/APITest.php b/plugins/Goals/tests/Integration/APITest.php
index 0d4be1c65c..2314cc5db2 100644
--- a/plugins/Goals/tests/Integration/APITest.php
+++ b/plugins/Goals/tests/Integration/APITest.php
@@ -34,9 +34,6 @@ class APITest extends IntegrationTestCase
parent::setUp();
$this->api = API::getInstance();
- Fixture::createAccessInstance();
- Piwik::setUserHasSuperUserAccess();
-
Fixture::createWebsite('2014-01-01 00:00:00');
Fixture::createWebsite('2014-01-01 00:00:00');
}
diff --git a/plugins/SitesManager/API.php b/plugins/SitesManager/API.php
index 1066aaf258..b217593ab2 100644
--- a/plugins/SitesManager/API.php
+++ b/plugins/SitesManager/API.php
@@ -14,6 +14,7 @@ use Piwik\Access;
use Piwik\Common;
use Piwik\Container\StaticContainer;
use Piwik\Date;
+use Piwik\Intl\Data\Provider\CurrencyDataProvider;
use Piwik\Network\IPUtils;
use Piwik\Option;
use Piwik\Piwik;
@@ -1371,10 +1372,12 @@ class API extends \Piwik\Plugin\API
*/
public function getCurrencyList()
{
- $currency = Site::getCurrencyList();
+ /** @var CurrencyDataProvider $dataProvider */
+ $dataProvider = StaticContainer::get('Piwik\Intl\Data\Provider\CurrencyDataProvider');
+ $currency = $dataProvider->getCurrencyList();
$return = array();
- foreach (array_keys(Site::getCurrencyList()) as $currencyCode) {
+ foreach (array_keys($currency) as $currencyCode) {
$return[$currencyCode] = Piwik::translate('Intl_Currency_' . $currencyCode) .
' (' . Piwik::translate('Intl_CurrencySymbol_' . $currencyCode) . ')';
}
@@ -1391,7 +1394,10 @@ class API extends \Piwik\Plugin\API
*/
public function getCurrencySymbols()
{
- $currencies = Site::getCurrencyList();
+ /** @var CurrencyDataProvider $dataProvider */
+ $dataProvider = StaticContainer::get('Piwik\Intl\Data\Provider\CurrencyDataProvider');
+ $currencies = $dataProvider->getCurrencyList();
+
return array_map(function ($a) {
return $a[0];
}, $currencies);
diff --git a/tests/PHPUnit/Integration/FrontControllerTest.php b/tests/PHPUnit/Integration/FrontControllerTest.php
index 8275779171..e869c71c8c 100644
--- a/tests/PHPUnit/Integration/FrontControllerTest.php
+++ b/tests/PHPUnit/Integration/FrontControllerTest.php
@@ -48,15 +48,9 @@ FORMAT;
$this->assertEquals('error', $response['result']);
$expectedFormat = <<<FORMAT
-test message on {includePath}/tests/resources/trigger-fatal-exception.php(23) #0 [internal function]: {closure}('CoreHome', 'index', Array) #1 {includePath}/core/EventDispatcher.php(141): call_user_func_array(Object(Closure), Array) #2 {includePath}/core/Piwik.php(775): Piwik\EventDispatcher-&gt;postEvent('Request.dispatc...', Array, false, NULL) #3 {includePath}/core/FrontController.php(569): Piwik\Piwik::postEvent('Request.dispatc...', Array) #4 {includePath}/core/FrontController.php(165): Piwik\FrontController-&gt;doDispatch('CoreHome', 'index', NULL) #5 {includePath}/tests/resources/trigger-fatal-exception.php(31): Piwik\FrontController-&gt;dispatch('CoreHome', 'index') #6 {main}
+test message on {includePath}/tests/resources/trigger-fatal-exception.php(23) #0 [internal function]: {closure}('CoreHome', 'index', Array) #1 {includePath}/core/EventDispatcher.php(141): call_user_func_array(Object(Closure), Array) #2 {includePath}/core/Piwik.php(761): Piwik\EventDispatcher-&gt;postEvent('Request.dispatc...', Array, false, Array) #3 {includePath}/core/FrontController.php(569): Piwik\Piwik::postEvent('Request.dispatc...', Array) #4 {includePath}/core/FrontController.php(165): Piwik\FrontController-&gt;doDispatch('CoreHome', 'index', Array) #5 {includePath}/tests/resources/trigger-fatal-exception.php(31): Piwik\FrontController-&gt;dispatch('CoreHome', 'index') #6 {main}
FORMAT;
- if (PHP_MAJOR_VERSION >= 7) {
- $expectedFormat = <<<FORMAT
-test message on {includePath}/tests/resources/trigger-fatal-exception.php(23) #0 [internal function]: {closure}('CoreHome', 'index', Array) #1 {includePath}/core/EventDispatcher.php(141): call_user_func_array(Object(Closure), Array) #2 {includePath}/core/Piwik.php(775): Piwik\EventDispatcher-&gt;postEvent('Request.dispatc...', Array, false, Array) #3 {includePath}/core/FrontController.php(569): Piwik\Piwik::postEvent('Request.dispatc...', Array) #4 {includePath}/core/FrontController.php(165): Piwik\FrontController-&gt;doDispatch('CoreHome', 'index', Array) #5 {includePath}/tests/resources/trigger-fatal-exception.php(31): Piwik\FrontController-&gt;dispatch('CoreHome', 'index') #6 {main}
-FORMAT;
- }
-
$this->assertStringMatchesFormat($expectedFormat, $response['message']);
}
diff --git a/tests/PHPUnit/Integration/ReleaseCheckListTest.php b/tests/PHPUnit/Integration/ReleaseCheckListTest.php
index af49877fc5..b4e4964e51 100644
--- a/tests/PHPUnit/Integration/ReleaseCheckListTest.php
+++ b/tests/PHPUnit/Integration/ReleaseCheckListTest.php
@@ -159,7 +159,6 @@ class ReleaseCheckListTest extends \PHPUnit_Framework_TestCase
$this->_checkEqual(array('log' => 'log_writers'), array('screen'));
$this->_checkEqual(array('log' => 'logger_api_call'), null);
- require_once PIWIK_INCLUDE_PATH . "/core/TaskScheduler.php";
$this->assertFalse(defined('DEBUG_FORCE_SCHEDULED_TASKS'));
// Check the index.php has "backtrace disabled"