Skip to content
Permalink
Browse files

hardcode a relative path to core installed via composer

 as book suggests
  • Loading branch information...
ptica committed Sep 8, 2014
1 parent 07965d6 commit 1959b97ba3834cc413c9497ad3e9f3a4adeeb2e0
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/Cake/Console/Command/Task/ProjectTask.php
@@ -340,6 +340,11 @@ protected function _replaceCorePath($filename, $hardCode) {
$root = strpos(CAKE_CORE_INCLUDE_PATH, '/') === 0 ? " DS . '" : "'";
$corePath = $root . str_replace(DS, "' . DS . '", trim(CAKE_CORE_INCLUDE_PATH, DS)) . "'";
$composer = ROOT . DS . APP_DIR . DS . 'Vendor' . DS . 'cakephp' . DS . 'cakephp' . DS . 'lib';
if (file_exists($composer)) {
$corePath = " ROOT . DS . APP_DIR . DS . 'Vendor' . DS . 'cakephp' . DS . 'cakephp' . DS . 'lib'";
}
$result = str_replace('__CAKE_PATH__', $corePath, $contents, $count);
if ($hardCode) {
$result = str_replace('//define(\'CAKE_CORE', 'define(\'CAKE_CORE', $result);

0 comments on commit 1959b97

Please sign in to comment.
You can’t perform that action at this time.