diff options
author | diosmosis <benakamoorthi@fastmail.fm> | 2014-08-20 09:06:20 +0400 |
---|---|---|
committer | diosmosis <benakamoorthi@fastmail.fm> | 2014-08-20 09:06:20 +0400 |
commit | 75b284c8f6fdbe7f69782c693a8849892e434da3 (patch) | |
tree | ea41f9c6fa181ba1cf0f6cd6ee03d0400155d3be | |
parent | 6de375ec21d236dce4f7a3caebb2ac605e17f9ea (diff) |
Remove Piwik autoloader and replace composer autoloader.
-rw-r--r-- | composer.json | 12 | ||||
-rw-r--r-- | composer.lock | 219 | ||||
-rwxr-xr-x | console | 1 | ||||
-rw-r--r-- | core/DataTable/Renderer.php | 2 | ||||
-rw-r--r-- | core/Db/Adapter.php | 3 | ||||
-rw-r--r-- | core/Loader.php | 126 | ||||
-rw-r--r-- | core/Plugin/Manager.php | 3 | ||||
-rw-r--r-- | core/Tracker.php | 1 | ||||
-rw-r--r-- | index.php | 2 | ||||
-rw-r--r-- | piwik.php | 3 | ||||
-rw-r--r-- | tests/PHPUnit/bootstrap.php | 1 | ||||
-rw-r--r-- | tests/PHPUnit/proxy/includes.php | 1 | ||||
-rw-r--r-- | tests/resources/staticFileServer.php | 2 |
13 files changed, 181 insertions, 195 deletions
diff --git a/composer.json b/composer.json index ada8661192..f68897fe60 100644 --- a/composer.json +++ b/composer.json @@ -18,6 +18,18 @@ "wiki": "http://dev.piwik.org/", "source": "https://github.com/piwik/piwik" }, + "autoload": { + "psr-4": { + "Piwik\\Plugins\\": "plugins/", + "Piwik\\": "core/" + }, + "psr-0": { + "Zend_": "libs/", + "HTML_": "libs/", + "PEAR_": "libs/", + "Archive_": "libs/" + } + }, "require": { "php": ">=5.3.2", "twig/twig": "1.*", diff --git a/composer.lock b/composer.lock index 257eeb64a4..253e9be71e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "ba9388aa9f61e6a370364aadbf0316ad", + "hash": "b47a13d5f82b7e36891b725fbea836f2", "packages": [ { "name": "leafo/lessphp", @@ -96,16 +96,16 @@ }, { "name": "piwik/device-detector", - "version": "2.3", + "version": "2.3.1", "source": { "type": "git", "url": "https://github.com/piwik/device-detector.git", - "reference": "c881d3592b55253c4e8968245e7b162f453ca4b9" + "reference": "9cd0338be126aaf947f20fd08a6381c0c658dca5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/piwik/device-detector/zipball/c881d3592b55253c4e8968245e7b162f453ca4b9", - "reference": "c881d3592b55253c4e8968245e7b162f453ca4b9", + "url": "https://api.github.com/repos/piwik/device-detector/zipball/9cd0338be126aaf947f20fd08a6381c0c658dca5", + "reference": "9cd0338be126aaf947f20fd08a6381c0c658dca5", "shasum": "" }, "require": { @@ -123,7 +123,7 @@ }, "notification-url": "https://packagist.org/downloads/", "license": [ - "GPL-3.0+" + "LGPL-3.0+" ], "authors": [ { @@ -139,21 +139,21 @@ "parser", "useragent" ], - "time": "2014-07-29 10:06:51" + "time": "2014-08-11 20:21:18" }, { "name": "symfony/console", - "version": "v2.5.0", + "version": "v2.5.3", "target-dir": "Symfony/Component/Console", "source": { "type": "git", "url": "https://github.com/symfony/Console.git", - "reference": "ef4ca73b0b3a10cbac653d3ca482d0cdd4502b2c" + "reference": "cd2d1e4bac2206b337326b0140ff475fe9ad5f63" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Console/zipball/ef4ca73b0b3a10cbac653d3ca482d0cdd4502b2c", - "reference": "ef4ca73b0b3a10cbac653d3ca482d0cdd4502b2c", + "url": "https://api.github.com/repos/symfony/Console/zipball/cd2d1e4bac2206b337326b0140ff475fe9ad5f63", + "reference": "cd2d1e4bac2206b337326b0140ff475fe9ad5f63", "shasum": "" }, "require": { @@ -184,19 +184,17 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { "name": "Symfony Community", "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" } ], "description": "Symfony Console Component", "homepage": "http://symfony.com", - "time": "2014-05-22 08:54:24" + "time": "2014-08-05 09:00:40" }, { "name": "tedivm/jshrink", @@ -241,16 +239,16 @@ }, { "name": "twig/twig", - "version": "v1.15.1", + "version": "v1.16.0", "source": { "type": "git", "url": "https://github.com/fabpot/Twig.git", - "reference": "1fb5784662f438d7d96a541e305e28b812e2eeed" + "reference": "8ce37115802e257a984a82d38254884085060024" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fabpot/Twig/zipball/1fb5784662f438d7d96a541e305e28b812e2eeed", - "reference": "1fb5784662f438d7d96a541e305e28b812e2eeed", + "url": "https://api.github.com/repos/fabpot/Twig/zipball/8ce37115802e257a984a82d38254884085060024", + "reference": "8ce37115802e257a984a82d38254884085060024", "shasum": "" }, "require": { @@ -259,7 +257,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.16-dev" } }, "autoload": { @@ -294,22 +292,135 @@ "keywords": [ "templating" ], - "time": "2014-02-13 10:19:29" + "time": "2014-07-05 12:19:05" } ], "packages-dev": [ { + "name": "ocramius/instantiator", + "version": "1.1.2", + "source": { + "type": "git", + "url": "https://github.com/Ocramius/Instantiator.git", + "reference": "a7abbb5fc9df6e7126af741dd6c140d1a7369435" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Ocramius/Instantiator/zipball/a7abbb5fc9df6e7126af741dd6c140d1a7369435", + "reference": "a7abbb5fc9df6e7126af741dd6c140d1a7369435", + "shasum": "" + }, + "require": { + "ocramius/lazy-map": "1.0.*", + "php": "~5.3" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "2.0.*@ALPHA" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Instantiator\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/Ocramius/Instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2014-08-14 15:10:55" + }, + { + "name": "ocramius/lazy-map", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/Ocramius/LazyMap.git", + "reference": "7fe3d347f5e618bcea7d39345ff83f3651d8b752" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Ocramius/LazyMap/zipball/7fe3d347f5e618bcea7d39345ff83f3651d8b752", + "reference": "7fe3d347f5e618bcea7d39345ff83f3651d8b752", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "athletic/athletic": "~0.1.6", + "phpmd/phpmd": "1.5.*", + "phpunit/phpunit": ">=3.7", + "satooshi/php-coveralls": "~0.6", + "squizlabs/php_codesniffer": "1.4.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "LazyMap\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/", + "role": "Developer" + } + ], + "description": "A library that provides lazy instantiation logic for a map of objects", + "homepage": "https://github.com/Ocramius/LazyMap", + "keywords": [ + "lazy", + "lazy instantiation", + "lazy loading", + "map", + "service location" + ], + "time": "2013-11-09 22:30:54" + }, + { "name": "phpunit/php-code-coverage", - "version": "2.0.9", + "version": "2.0.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "ed8ac99ce38c3fd134128c898f7ca74665abef7f" + "reference": "6d196af48e8c100a3ae881940123e693da5a9217" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ed8ac99ce38c3fd134128c898f7ca74665abef7f", - "reference": "ed8ac99ce38c3fd134128c898f7ca74665abef7f", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6d196af48e8c100a3ae881940123e693da5a9217", + "reference": "6d196af48e8c100a3ae881940123e693da5a9217", "shasum": "" }, "require": { @@ -361,7 +472,7 @@ "testing", "xunit" ], - "time": "2014-06-29 08:14:40" + "time": "2014-08-06 06:39:42" }, { "name": "phpunit/php-file-iterator", @@ -548,16 +659,16 @@ }, { "name": "phpunit/phpunit", - "version": "4.1.3", + "version": "4.2.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "939cb801b3b2aa253aedd0b279f40bb8f35cec91" + "reference": "a33fa68ece9f8c68589bfc2da8d2794e27b820bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/939cb801b3b2aa253aedd0b279f40bb8f35cec91", - "reference": "939cb801b3b2aa253aedd0b279f40bb8f35cec91", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a33fa68ece9f8c68589bfc2da8d2794e27b820bc", + "reference": "a33fa68ece9f8c68589bfc2da8d2794e27b820bc", "shasum": "" }, "require": { @@ -571,7 +682,7 @@ "phpunit/php-file-iterator": "~1.3.1", "phpunit/php-text-template": "~1.2", "phpunit/php-timer": "~1.0.2", - "phpunit/phpunit-mock-objects": "~2.1", + "phpunit/phpunit-mock-objects": "~2.2", "sebastian/comparator": "~1.0", "sebastian/diff": "~1.1", "sebastian/environment": "~1.0", @@ -588,7 +699,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1.x-dev" + "dev-master": "4.2.x-dev" } }, "autoload": { @@ -618,28 +729,29 @@ "testing", "xunit" ], - "time": "2014-06-11 14:15:47" + "time": "2014-08-18 05:12:30" }, { "name": "phpunit/phpunit-mock-objects", - "version": "2.1.5", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "7878b9c41edb3afab92b85edf5f0981014a2713a" + "reference": "42e589e08bc86e3e9bdf20d385e948347788505b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/7878b9c41edb3afab92b85edf5f0981014a2713a", - "reference": "7878b9c41edb3afab92b85edf5f0981014a2713a", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/42e589e08bc86e3e9bdf20d385e948347788505b", + "reference": "42e589e08bc86e3e9bdf20d385e948347788505b", "shasum": "" }, "require": { + "ocramius/instantiator": "~1.0", "php": ">=5.3.3", "phpunit/php-text-template": "~1.2" }, "require-dev": { - "phpunit/phpunit": "~4.1" + "phpunit/phpunit": "4.2.*@dev" }, "suggest": { "ext-soap": "*" @@ -647,7 +759,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1.x-dev" + "dev-master": "2.2.x-dev" } }, "autoload": { @@ -675,7 +787,7 @@ "mock", "xunit" ], - "time": "2014-06-12 07:22:15" + "time": "2014-08-02 13:50:58" }, { "name": "sebastian/comparator", @@ -946,17 +1058,17 @@ }, { "name": "symfony/yaml", - "version": "v2.5.0", + "version": "v2.5.3", "target-dir": "Symfony/Component/Yaml", "source": { "type": "git", "url": "https://github.com/symfony/Yaml.git", - "reference": "b4b09c68ec2f2727574544ef0173684281a5033c" + "reference": "5a75366ae9ca8b4792cd0083e4ca4dff9fe96f1f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/b4b09c68ec2f2727574544ef0173684281a5033c", - "reference": "b4b09c68ec2f2727574544ef0173684281a5033c", + "url": "https://api.github.com/repos/symfony/Yaml/zipball/5a75366ae9ca8b4792cd0083e4ca4dff9fe96f1f", + "reference": "5a75366ae9ca8b4792cd0083e4ca4dff9fe96f1f", "shasum": "" }, "require": { @@ -979,19 +1091,17 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { "name": "Symfony Community", "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" } ], "description": "Symfony Yaml Component", "homepage": "http://symfony.com", - "time": "2014-05-16 14:25:18" + "time": "2014-08-05 09:00:40" } ], "aliases": [ @@ -1001,6 +1111,7 @@ "stability-flags": [ ], + "prefer-stable": false, "platform": { "php": ">=5.3.2" }, @@ -17,7 +17,6 @@ require_once PIWIK_INCLUDE_PATH . '/core/testMinimumPhpVersion.php'; require_once file_exists(PIWIK_INCLUDE_PATH . '/vendor/autoload.php') ? PIWIK_INCLUDE_PATH . '/vendor/autoload.php' // Piwik is the main project : PIWIK_INCLUDE_PATH . '/../../autoload.php'; // Piwik is installed as a dependency -require_once PIWIK_INCLUDE_PATH . '/core/Loader.php'; require_once PIWIK_INCLUDE_PATH . '/libs/upgradephp/upgrade.php'; Piwik\Translate::loadEnglishTranslation(); diff --git a/core/DataTable/Renderer.php b/core/DataTable/Renderer.php index ddcde91cf3..dae970dd5f 100644 --- a/core/DataTable/Renderer.php +++ b/core/DataTable/Renderer.php @@ -10,7 +10,6 @@ namespace Piwik\DataTable; use Exception; use Piwik\DataTable; -use Piwik\Loader; use Piwik\Metrics; use Piwik\Piwik; @@ -168,7 +167,6 @@ abstract class Renderer $className = ucfirst(strtolower($name)); $className = 'Piwik\DataTable\Renderer\\' . $className; try { - Loader::loadClass($className); return new $className; } catch (Exception $e) { $availableRenderers = implode(', ', self::getRenderers()); diff --git a/core/Db/Adapter.php b/core/Db/Adapter.php index 6bafa3a653..342a320d72 100644 --- a/core/Db/Adapter.php +++ b/core/Db/Adapter.php @@ -8,7 +8,6 @@ */ namespace Piwik\Db; -use Piwik\Loader; use Zend_Db_Table; /** @@ -39,8 +38,6 @@ class Adapter } $className = self::getAdapterClassName($adapterName); - Loader::loadClass($className); - $adapter = new $className($dbInfos); if ($connect) { diff --git a/core/Loader.php b/core/Loader.php deleted file mode 100644 index 6e33987f19..0000000000 --- a/core/Loader.php +++ /dev/null @@ -1,126 +0,0 @@ -<?php -/** - * Piwik - free/libre analytics platform - * - * @link http://piwik.org - * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - * - */ - -namespace Piwik; - -use Exception; - -/** - * Piwik auto loader - * - */ -class Loader -{ - // our class search path; current directory is intentionally excluded - protected static $dirs = array('/core/', '/plugins/'); - - /** - * Get class file name - * - * @param string $class Class name - * @return string Class file name - * @throws Exception if class name is invalid - */ - protected static function getClassFileName($class) - { - if (!preg_match('/^[A-Za-z0-9_\\\\]+$/D', $class)) { - throw new Exception("Invalid class name \"$class\"."); - } - - // prefixed class - $class = str_replace('_', '/', $class); - - // namespace \Piwik\Common - $class = str_replace('\\', '/', $class); - - if ($class == 'Piwik') { - return $class; - } - - $class = self::removeFirstMatchingPrefix($class, array('/Piwik/', 'Piwik/')); - $class = self::removeFirstMatchingPrefix($class, array('/Plugins/', 'Plugins/')); - - return $class; - } - - protected static function removeFirstMatchingPrefix($class, $vendorPrefixesToRemove) - { - foreach ($vendorPrefixesToRemove as $prefix) { - if (strpos($class, $prefix) === 0) { - return substr($class, strlen($prefix)); - } - } - - return $class; - } - - private static function isPluginClass($class) - { - return 0 === strpos($class, 'Piwik\Plugins') || 0 === strpos($class, '\Piwik\Plugins'); - } - - private static function usesPiwikNamespace($class) - { - return 0 === strpos($class, 'Piwik\\') || 0 === strpos($class, '\Piwik\\'); - } - - /** - * Load class by name - * - * @param string $class Class name - * @throws Exception if class not found - */ - public static function loadClass($class) - { - $classPath = self::getClassFileName($class); - - if (static::isPluginClass($class)) { - static::tryToLoadClass($class, '/plugins/', $classPath); - } elseif (static::usesPiwikNamespace($class)) { - static::tryToLoadClass($class, '/core/', $classPath); - } else { - // non-Piwik classes (e.g., Zend Framework) are in libs/ - static::tryToLoadClass($class, '/libs/', $classPath); - } - } - - private static function tryToLoadClass($class, $dir, $classPath) - { - $path = PIWIK_INCLUDE_PATH . $dir . $classPath . '.php'; - - if (file_exists($path)) { - require_once $path; // prefixed by PIWIK_INCLUDE_PATH - - return class_exists($class, false) || interface_exists($class, false); - } - - return false; - } - - /** - * Autoloader - * - * @param string $class Class name - */ - public static function autoload($class) - { - try { - self::loadClass($class); - } catch (Exception $e) { - } - } -} - -// use the SPL autoload stack -spl_autoload_register(array('Piwik\Loader', 'autoload')); - -// preserve any existing __autoload -if (function_exists('__autoload')) { - spl_autoload_register('__autoload'); -} diff --git a/core/Plugin/Manager.php b/core/Plugin/Manager.php index c7d0164d5a..114d79a1d6 100644 --- a/core/Plugin/Manager.php +++ b/core/Plugin/Manager.php @@ -22,6 +22,7 @@ use Piwik\Theme; use Piwik\Tracker; use Piwik\Translate; use Piwik\Updater; +use Piwik\SettingsServer; use Piwik\Plugin\Dimension\ActionDimension; use Piwik\Plugin\Dimension\ConversionDimension; use Piwik\Plugin\Dimension\VisitDimension; @@ -957,7 +958,7 @@ class Manager extends Singleton private function loadTranslation($plugin, $langCode) { // we are in Tracker mode if Loader is not (yet) loaded - if (!class_exists('Piwik\\Loader', false)) { + if (SettingsServer::isTrackerApiRequest()) { return false; } diff --git a/core/Tracker.php b/core/Tracker.php index a6ab0225ac..d0502e3ca3 100644 --- a/core/Tracker.php +++ b/core/Tracker.php @@ -407,7 +407,6 @@ class Tracker && self::$initTrackerMode === false ) { self::$initTrackerMode = true; - require_once PIWIK_INCLUDE_PATH . '/core/Loader.php'; require_once PIWIK_INCLUDE_PATH . '/core/Option.php'; Access::getInstance(); @@ -38,10 +38,10 @@ session_cache_limiter('nocache'); require_once file_exists(PIWIK_INCLUDE_PATH . '/vendor/autoload.php') ? PIWIK_INCLUDE_PATH . '/vendor/autoload.php' // Piwik is the main project : PIWIK_INCLUDE_PATH . '/../../autoload.php'; // Piwik is installed as a dependency -require_once PIWIK_INCLUDE_PATH . '/core/Loader.php'; if(!defined('PIWIK_PRINT_ERROR_BACKTRACE')) { define('PIWIK_PRINT_ERROR_BACKTRACE', false); } require_once PIWIK_INCLUDE_PATH . '/core/dispatch.php'; + // TODO: check every folder in libs/ for autoload crap (maybe move to composr?)
\ No newline at end of file @@ -83,7 +83,6 @@ require_once PIWIK_INCLUDE_PATH . '/core/Tracker/VisitorNotFoundInDb.php'; require_once PIWIK_INCLUDE_PATH . '/core/CacheFile.php'; require_once PIWIK_INCLUDE_PATH . '/core/Filesystem.php'; require_once PIWIK_INCLUDE_PATH . '/core/Cookie.php'; -require_once PIWIK_INCLUDE_PATH . '/core/Loader.php'; session_cache_limiter('nocache'); @date_default_timezone_set('UTC'); @@ -96,8 +95,6 @@ if (!defined('PIWIK_ENABLE_TRACKING') || PIWIK_ENABLE_TRACKING) { $GLOBALS['PIWIK_TRACKER_DEBUG'] = (bool) \Piwik\Config::getInstance()->Tracker['debug']; if ($GLOBALS['PIWIK_TRACKER_DEBUG'] === true) { - require_once PIWIK_INCLUDE_PATH . '/core/Loader.php'; - require_once PIWIK_INCLUDE_PATH . '/core/Error.php'; \Piwik\Error::setErrorHandler(); require_once PIWIK_INCLUDE_PATH . '/core/ExceptionHandler.php'; diff --git a/tests/PHPUnit/bootstrap.php b/tests/PHPUnit/bootstrap.php index d32c604026..6a80c72755 100644 --- a/tests/PHPUnit/bootstrap.php +++ b/tests/PHPUnit/bootstrap.php @@ -33,7 +33,6 @@ require_once file_exists(PIWIK_INCLUDE_PATH . '/vendor/autoload.php') require_once PIWIK_INCLUDE_PATH . '/libs/upgradephp/upgrade.php'; require_once PIWIK_INCLUDE_PATH . '/core/testMinimumPhpVersion.php'; -require_once PIWIK_INCLUDE_PATH . '/core/Loader.php'; require_once PIWIK_INCLUDE_PATH . '/core/FrontController.php'; require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/DatabaseTestCase.php'; require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/IntegrationTestCase.php'; diff --git a/tests/PHPUnit/proxy/includes.php b/tests/PHPUnit/proxy/includes.php index 6e3acc8af5..858ae485d2 100644 --- a/tests/PHPUnit/proxy/includes.php +++ b/tests/PHPUnit/proxy/includes.php @@ -13,7 +13,6 @@ require_once file_exists(PIWIK_INCLUDE_PATH . '/vendor/autoload.php') ? PIWIK_INCLUDE_PATH . '/vendor/autoload.php' // Piwik is the main project : PIWIK_INCLUDE_PATH . '/../../autoload.php'; // Piwik is installed as a dependency -require_once PIWIK_INCLUDE_PATH . '/core/Loader.php'; require_once PIWIK_INCLUDE_PATH . '/core/EventDispatcher.php'; require_once PIWIK_INCLUDE_PATH . '/core/Piwik.php'; require_once PIWIK_INCLUDE_PATH . '/libs/upgradephp/upgrade.php'; diff --git a/tests/resources/staticFileServer.php b/tests/resources/staticFileServer.php index 237cf0af59..5907c169e3 100644 --- a/tests/resources/staticFileServer.php +++ b/tests/resources/staticFileServer.php @@ -39,7 +39,7 @@ require_once PIWIK_INCLUDE_PATH . '/core/testMinimumPhpVersion.php'; session_cache_limiter('nocache'); @date_default_timezone_set('UTC'); -require_once PIWIK_INCLUDE_PATH .'/core/Loader.php'; +require_once PIWIK_INCLUDE_PATH .'/vendor/autoload.php'; // This is Piwik logo, the static file used in this test suit define("TEST_FILE_LOCATION", dirname(__FILE__) . "/lipsum.txt"); |