Merge pull request #4167 from dereuromark/2.6-composer

Auto-detect composer installed CakePHP folder.
This commit is contained in:
José Lorenzo Rodríguez 2014-08-06 10:49:07 +02:00
commit c3ded4e290
4 changed files with 43 additions and 3 deletions

View file

@ -26,7 +26,7 @@ if (!defined('DS')) {
}
/**
* These defines should only be edited if you have cake installed in
* These defines should only be edited if you have CakePHP installed in
* a directory layout other than the way it is distributed.
* When using custom settings be sure to use the DS and do not add a trailing DS.
*/
@ -63,6 +63,16 @@ if (!defined('APP_DIR')) {
*/
//define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'lib');
/**
* This auto-detects CakePHP as a composer installed library.
* You may remove this if you are not planning to use composer (not recommended, though).
*/
$vendorPath = ROOT . DS . APP_DIR . DS . 'Vendor' . DS . 'cakephp' . DS . 'cakephp' . DS . 'lib';
$dispatcher = 'Cake' . DS . 'Console' . DS . 'ShellDispatcher.php';
if (!defined('CAKE_CORE_INCLUDE_PATH') && file_exists($vendorPath . DS . $dispatcher)) {
define('CAKE_CORE_INCLUDE_PATH', $vendorPath);
}
/**
* Editing below this line should NOT be necessary.
* Change at your own risk.

View file

@ -27,7 +27,7 @@ if (!defined('DS')) {
}
/**
* These defines should only be edited if you have cake installed in
* These defines should only be edited if you have CakePHP installed in
* a directory layout other than the way it is distributed.
* When using custom settings be sure to use the DS and do not add a trailing DS.
*/
@ -61,6 +61,16 @@ if (!defined('APP_DIR')) {
*/
//define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'lib');
/**
* This auto-detects CakePHP as a composer installed library.
* You may remove this if you are not planning to use composer (not recommended, though).
*/
$vendorPath = ROOT . DS . APP_DIR . DS . 'Vendor' . DS . 'cakephp' . DS . 'cakephp' . DS . 'lib';
$dispatcher = 'Cake' . DS . 'Console' . DS . 'ShellDispatcher.php';
if (!defined('CAKE_CORE_INCLUDE_PATH') && file_exists($vendorPath . DS . $dispatcher)) {
define('CAKE_CORE_INCLUDE_PATH', $vendorPath);
}
/**
* Editing below this line should not be necessary.
* Change at your own risk.

View file

@ -54,6 +54,16 @@ if (!defined('APP_DIR')) {
*/
//define('CAKE_CORE_INCLUDE_PATH', __CAKE_PATH__);
/**
* This auto-detects CakePHP as a composer installed library.
* You may remove this if you are not planning to use composer (not recommended, though).
*/
$vendorPath = ROOT . DS . APP_DIR . DS . 'Vendor' . DS . 'cakephp' . DS . 'cakephp' . DS . 'lib';
$dispatcher = 'Cake' . DS . 'Console' . DS . 'ShellDispatcher.php';
if (!defined('CAKE_CORE_INCLUDE_PATH') && file_exists($vendorPath . DS . $dispatcher)) {
define('CAKE_CORE_INCLUDE_PATH', $vendorPath);
}
/**
* Editing below this line should NOT be necessary.
* Change at your own risk.

View file

@ -18,7 +18,7 @@ if (!defined('DS')) {
}
/**
* These defines should only be edited if you have cake installed in
* These defines should only be edited if you have CakePHP installed in
* a directory layout other than the way it is distributed.
* When using custom settings be sure to use the DS and do not add a trailing DS.
*/
@ -52,6 +52,16 @@ if (!defined('APP_DIR')) {
*/
//define('CAKE_CORE_INCLUDE_PATH', __CAKE_PATH__);
/**
* This auto-detects CakePHP as a composer installed library.
* You may remove this if you are not planning to use composer (not recommended, though).
*/
$vendorPath = ROOT . DS . APP_DIR . DS . 'Vendor' . DS . 'cakephp' . DS . 'cakephp' . DS . 'lib';
$dispatcher = 'Cake' . DS . 'Console' . DS . 'ShellDispatcher.php';
if (!defined('CAKE_CORE_INCLUDE_PATH') && file_exists($vendorPath . DS . $dispatcher)) {
define('CAKE_CORE_INCLUDE_PATH', $vendorPath);
}
/**
* Editing below this line should not be necessary.
* Change at your own risk.