From f172b5924d52cbfda53e7ce23db0bb58da6db0f3 Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Mon, 22 Dec 2014 16:32:06 +1300 Subject: Removed Piwik\Loader: Composer's autoloader is now included in core/bootstrap.php --- core/bootstrap.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'core/bootstrap.php') diff --git a/core/bootstrap.php b/core/bootstrap.php index 546625b8c6..d6e809df20 100644 --- a/core/bootstrap.php +++ b/core/bootstrap.php @@ -22,12 +22,21 @@ disableEaccelerator(); require_once PIWIK_INCLUDE_PATH . '/libs/upgradephp/upgrade.php'; +// Composer autoloader +if (file_exists(PIWIK_INCLUDE_PATH . '/vendor/autoload.php')) { + $path = PIWIK_INCLUDE_PATH . '/vendor/autoload.php'; // Piwik is the main project +} else { + $path = PIWIK_INCLUDE_PATH . '/../../autoload.php'; // Piwik is installed as a dependency +} +require_once $path; + /** - * See https://github.com/piwik/piwik/issues/4439#comment:8 and https://github.com/eaccelerator/eaccelerator/issues/12 - * * Eaccelerator does not support closures and is known to be not comptabile with Piwik. Therefore we are disabling * it automatically. At this point it looks like Eaccelerator is no longer under development and the bug has not * been fixed within a year. + * + * @link https://github.com/piwik/piwik/issues/4439#comment:8 + * @link https://github.com/eaccelerator/eaccelerator/issues/12 */ function disableEaccelerator() { -- cgit v1.2.3