mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Merge pull request #4167 from dereuromark/2.6-composer
Auto-detect composer installed CakePHP folder.
This commit is contained in:
commit
c3ded4e290
4 changed files with 43 additions and 3 deletions
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue