From e9d2f2f733343bff29f5bab0fc94263d02119f0b Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Tue, 1 Nov 2016 15:45:56 +1300 Subject: [PATCH] NEW: Use composer autoloader to set the right include path. --- composer.json | 1 + src/Core/Constants.php | 17 ++--------------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/composer.json b/composer.json index bf6d791f6..ce296f5c9 100644 --- a/composer.json +++ b/composer.json @@ -53,6 +53,7 @@ "classmap": ["tests/behat/features/bootstrap"] }, "include-path": [ + "src/", "thirdparty/" ], "min-stability": "dev", diff --git a/src/Core/Constants.php b/src/Core/Constants.php index 08053bee2..10d45ff3a 100644 --- a/src/Core/Constants.php +++ b/src/Core/Constants.php @@ -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 */