NEW: Use composer autoloader to set the right include path.

This commit is contained in:
Sam Minnee 2016-11-01 15:45:56 +13:00
parent 7a10c194bd
commit e9d2f2f733
2 changed files with 3 additions and 15 deletions

View File

@ -53,6 +53,7 @@
"classmap": ["tests/behat/features/bootstrap"]
},
"include-path": [
"src/",
"thirdparty/"
],
"min-stability": "dev",

View File

@ -248,24 +248,11 @@ if(!defined('ASSETS_PATH')) {
define('ASSETS_PATH', BASE_PATH . '/' . ASSETS_DIR);
}
///////////////////////////////////////////////////////////////////////////////
// INCLUDES
// Custom include path - deprecated
if(defined('CUSTOM_INCLUDE_PATH')) {
$includePath = '.' . PATH_SEPARATOR . CUSTOM_INCLUDE_PATH . PATH_SEPARATOR
. FRAMEWORK_PATH . PATH_SEPARATOR
. FRAMEWORK_PATH . '/parsers' . PATH_SEPARATOR
. THIRDPARTY_PATH . PATH_SEPARATOR
. get_include_path();
} else {
$includePath = '.' . PATH_SEPARATOR . FRAMEWORK_PATH . PATH_SEPARATOR
. FRAMEWORK_PATH . '/parsers' . PATH_SEPARATOR
. THIRDPARTY_PATH . PATH_SEPARATOR
. get_include_path();
set_include_path(CUSTOM_INCLUDE_PATH . PATH_SEPARATOR . get_include_path());
}
set_include_path($includePath);
/**
* Define the temporary folder if it wasn't defined yet
*/