$ cd /path/to/your/website
$ rm -Rf ./lib
Put it in the top level, NOT in app/!
{
"minimum-stability": "dev",
"config": {
"vendor-dir": "vendors"
},
"repositories" : [
{
"type": "package",
"package": {
"name" : "cakephp/cakephp",
"version" : "2.4.1",
"source" : {
"type" : "git",
"url" : "git://github.com/cakephp/cakephp.git",
"reference" : "2.4.1"
},
"bin" : ["lib/Cake/Console/cake"]
}
}
],
"extra": {
"installer-paths": {
"app/Plugin/DebugKit": ["cakephp/debug_kit"]
}
},
"require" : {
"php": ">=5.3",
"cakephp/cakephp" : "2.4.*",
"cakephp/debug_kit": "2.2.*"
}
}
$ composer update
$ vendors/bin/cake bake project $(pwd)/app
Replace this...
<?php
define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'lib');
...with this
<?php
define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'vendors' . DS . 'cakephp' . DS . 'cakephp' . DS . 'lib');
Replace this...
<?php
$root = dirname(dirname(dirname(__FILE__)));
...with this
<?php
$root = dirname(dirname(dirname(__FILE__))) . $ds . 'vendors' . $ds . 'cakephp' . $ds . 'cakephp';
<?php
require dirname(dirname(__DIR__)) . '/vendors/autoload.php';
Update the config section ...
"config": {
"vendor-dir": "vendors",
"secure-http":false
}