Skip to content
Permalink
Browse files

Fix composer app issues with cake.php

  • Loading branch information...
dereuromark committed Jun 24, 2014
1 parent 044065d commit 05709908a7f529d4e49534b687b0f31884e95132
Showing with 22 additions and 6 deletions.
  1. +10 −3 app/Console/cake.php
  2. +12 −3 lib/Cake/Console/Templates/skel/Console/cake.php
@@ -25,11 +25,18 @@
if (function_exists('ini_set')) {
$root = dirname(dirname(dirname(__FILE__)));
$appDir = basename(dirname(dirname(__FILE__)));
$install = $root . DS . 'lib';
$composerInstall = $root . DS . $appDir . DS . 'Vendor' . DS . 'cakephp' . DS . 'cakephp' . DS . 'lib';
// the following line differs from its sibling
// the following lines differ from its sibling

This comment has been minimized.

@Ivoz

Ivoz Jul 5, 2014

Contributor

their?

This comment has been minimized.

@dereuromark

dereuromark Jul 5, 2014

Author Member

Are you able to make a PR with it pretty quick?
Also note that there is a file in Cake\Console\Templates as well.

// /lib/Cake/Console/Templates/skel/Console/cake.php
ini_set('include_path', $root . DS . 'lib' . PATH_SEPARATOR . ini_get('include_path'));
unset($root);
if (file_exists($composerInstall . DS . $dispatcher)) {
$install = $composerInstall;
}
ini_set('include_path', $install . PATH_SEPARATOR . ini_get('include_path'));
unset($root, $appDir, $install, $composerInstall);
}
if (!include $dispatcher) {
@@ -24,11 +24,20 @@
if (function_exists('ini_set')) {
$root = dirname(dirname(dirname(__FILE__)));
$appDir = basename(dirname(dirname(__FILE__)));
$install = $root . DS . 'lib';
$composerInstall = $root . DS . $appDir . DS . 'Vendor' . DS . 'cakephp' . DS . 'cakephp' . DS . 'lib';
// the following line differs from its sibling
// the following lines differ from its sibling
// /app/Console/cake.php
ini_set('include_path', $root . PATH_SEPARATOR . __CAKE_PATH__ . PATH_SEPARATOR . ini_get('include_path'));
unset($root);
if (file_exists($composerInstall . DS . $dispatcher)) {
$install = $composerInstall;
} elseif (!file_exists($install . DS . $dispatcher)) {
$install = $root . PATH_SEPARATOR . __CAKE_PATH__;
}
ini_set('include_path', $install . PATH_SEPARATOR . ini_get('include_path'));
unset($root, $appDir, $install, $composerInstall);
}
if (!include $dispatcher) {

0 comments on commit 0570990

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