Skip to content

Commit

Permalink
Move application code down a level.
Browse files Browse the repository at this point in the history
This is required so that composer's psr-0 autoloader can find code in
the App\ namespace. I decided to not move tmp, webroot and vendor as
they never contain application PHP code.
  • Loading branch information
markstory committed Sep 6, 2013
1 parent b3c82ea commit 439c764
Show file tree
Hide file tree
Showing 48 changed files with 6 additions and 5 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 3 additions & 2 deletions App/Config/bootstrap.php → App/App/Config/bootstrap.php
Expand Up @@ -14,10 +14,11 @@
*/
namespace App\Config;

if (!file_exists(dirname(__DIR__) . '/vendor/autoload.php')) {
if (!file_exists(dirname(dirname(__DIR__)) . '/vendor/autoload.php')) {
die('Could not find vendor/autoload.php. You need to install dependencies with `php composer.phar install` first.');
}
require dirname(__DIR__) . '/vendor/autoload.php';
require dirname(dirname(__DIR__)) . '/vendor/autoload.php';


/**
* Configure paths required to find CakePHP + general filepath
Expand Down
6 changes: 3 additions & 3 deletions App/Config/paths.php → App/App/Config/paths.php
Expand Up @@ -47,7 +47,7 @@
/**
* File path to the webroot directory.
*/
define('WWW_ROOT', APP . WEBROOT_DIR . DS);
define('WWW_ROOT', ROOT . DS . WEBROOT_DIR . DS);

/**
* Path to the tests directory.
Expand All @@ -57,7 +57,7 @@
/**
* Path to the temporary files directory.
*/
define('TMP', APP . 'tmp' . DS);
define('TMP', ROOT . DS . 'tmp' . DS);

/**
* Path to the logs directory.
Expand All @@ -74,7 +74,7 @@
*
* CakePHP should always be installed with composer, so look there.
*/
define('CAKE_CORE_INCLUDE_PATH', dirname(__DIR__) . '/vendor/cakephp/cakephp');
define('CAKE_CORE_INCLUDE_PATH', ROOT . '/vendor/cakephp/cakephp');

/**
* Path to the cake directory.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 439c764

Please sign in to comment.