CakePHP 3 - Defining the Core Outside Webroot

Reading time ~1 minute

One thing that CakePHP 3 documentation has you do when you install is put the CakePHP Core inside the vendor directory of the app. If you want to share the CakePHP core between multiple apps you can follow these simple steps.

Step 1: Install the CakePHP 3 App

cd {webroot}
composer create-project -s dev cakephp/app ./
Step 2: Move the CakePHP 3 core to somewhere external

In this example, I am going to put it inside `/CakeCore/cakephp` but you can put it wherever.

mkdir /CakeCore
mv {webroot}/vendor/cakephp/cakephp /CakeCore/cakephp
Step 3: Change the Core Definition in your App

Lastly we need to point the app to the newly cloned core.

cd {webroot}/App/Config
vim paths.php
And replace this line (approximately line 73):

define('CAKE_CORE_INCLUDE_PATH', ROOT . '/vendor/cakephp/cakephp');
With this line:

define('CAKE_CORE_INCLUDE_PATH', '/CakeCore/cakephp/');
That's it! Continue on your merry way.

Asyncio Basics Python 35

# Asyncio basics in pythonPython 3.5 brought with it asyncio. An event loop based paradigm previously available as a library but now it i...… Continue reading

Quick Laravel/Lumen install with Docker!

Published on March 02, 2016

PHP To Python

Published on February 24, 2016