From ac0b2c9ce2e0a77b95aaac1ead0a81df65620e99 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 2 Jan 2015 10:01:37 -0800 Subject: [PATCH] composer - Use classloader from civicrm-core.git instead of civicrm-packages.git. --- CRM/Core/ClassLoader.php | 4 ++-- composer.json | 4 ++-- composer.lock | 22 ++++++---------------- tests/phpunit/CiviTest/bootstrap.php | 2 +- 4 files changed, 11 insertions(+), 21 deletions(-) diff --git a/CRM/Core/ClassLoader.php b/CRM/Core/ClassLoader.php index 60d4df2ac5..574b96416f 100644 --- a/CRM/Core/ClassLoader.php +++ b/CRM/Core/ClassLoader.php @@ -80,7 +80,7 @@ class CRM_Core_ClassLoader { } $civicrm_base_path = dirname(dirname(__DIR__)); - require_once dirname(dirname(__DIR__)) . '/packages/vendor/autoload.php'; + require_once dirname(dirname(__DIR__)) . '/vendor/autoload.php'; // we do this to prevent a autoloader errors with joomla / 3rd party packages // use absolute path since we dont know the content of include_path as yet @@ -99,7 +99,7 @@ class CRM_Core_ClassLoader { ); $include_paths = implode(PATH_SEPARATOR, $include_paths); set_include_path($include_paths . PATH_SEPARATOR . get_include_path()); - require_once "$civicrm_base_path/packages/vendor/autoload.php"; + require_once "$civicrm_base_path/vendor/autoload.php"; } public function initHtmlPurifier($prepend) { diff --git a/composer.json b/composer.json index e41ef17a6d..4ee79b3b94 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,8 @@ { "autoload": { "psr-0": { - "PHPUnit_": ["."], - "Civi\\": ["../", "../tests/phpunit/"] + "PHPUnit_": ["packages/"], + "Civi\\": [".", "tests/phpunit/"] } }, "require": { diff --git a/composer.lock b/composer.lock index f791ef470f..9e6f4df872 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": "6778140f210ee24575efdd0b8f32bb11", + "hash": "33b8ac9b59c02e57b8aa1b24bee3c378", "packages": [ { "name": "psr/log", @@ -208,21 +208,11 @@ "time": "2014-07-10 08:55:37" } ], - "packages-dev": [ - - ], - "aliases": [ - - ], + "packages-dev": [], + "aliases": [], "minimum-stability": "stable", - "stability-flags": [ - - ], + "stability-flags": [], "prefer-stable": false, - "platform": [ - - ], - "platform-dev": [ - - ] + "platform": [], + "platform-dev": [] } diff --git a/tests/phpunit/CiviTest/bootstrap.php b/tests/phpunit/CiviTest/bootstrap.php index a16ddec492..8073d31391 100644 --- a/tests/phpunit/CiviTest/bootstrap.php +++ b/tests/phpunit/CiviTest/bootstrap.php @@ -23,7 +23,7 @@ if ( file_exists( '/etc/timezone' ) ) { # Crank up the memory ini_set('memory_limit', '2G'); -require_once $GLOBALS['base_dir'] . '/packages/vendor/autoload.php'; +require_once $GLOBALS['base_dir'] . '/vendor/autoload.php'; /* require $GLOBALS['base_dir'] . DIRECTORY_SEPARATOR . -- 2.25.1