improved loading of composer autoload

This commit is contained in:
Val Bancer 2017-07-20 22:21:01 +02:00
parent 31489a75d6
commit 7dae9e24da

View file

@ -22,6 +22,17 @@
* @license https://opensource.org/licenses/mit-license.php MIT License
*/
/**
* Load Composer autoload.
*
* Remove and re-prepend CakePHP's autoloader as Composer thinks it is the most important.
* @see http://goo.gl/kKVJO7
* @see http://book.cakephp.org/2.0/en/installation/advanced-installation.html#installing-cakephp-with-composer
*/
require ROOT . DS . 'vendors/autoload.php';
spl_autoload_unregister(array('App', 'load'));
spl_autoload_register(array('App', 'load'), true, true);
// Setup a 'default' cache configuration for use in the application.
Cache::config('default', array('engine' => 'File'));