CakePHP 3 is just around the corner and is a big departure from previous versions of CakePHP. This is the first of a multi-part tutorial on creating a simple CakePHP 3 application using Vagrant and Composer. It is assumed that you have some basic PHP knowledge. Previous CakePHP knowledge is not a requirement, but it would be helpful. In this tutorial, we will be creating a simple event management application. Users will be able to add events, add friends and invite friends to attend their events.
In this first part, we will start by installing development environment requirements. I will make no assumptions on what operating system you are running, but where needed I will link to guides for Windows, OS X and Linux. I will, however, be making special mention of Windows, since there are many Windows based PHP developers who've only ever used outdated tools like WAMP and XAMPP without realising the incredible alternatives that are available.
Vagrant is a incredibly versatile tool that allows you to create lightweight, reproducible and portable development environments. It is easy to install, and thanks to projects like PuPHPet and FriendsOfCake, very easy to configure. Start by downloading and installing VirtualBox, Vagrant and Git for windows:
- VirtualBox download: https://www.virtualbox.org/wiki/Downloads
- Vagrant download: http://www.vagrantup.com/downloads.html
- If you are running windows - Git (For the SSH client it provides): http://git-scm.com/download/win
Once you've downloaded and installed them move onto part 2 where I'll show you how to fire up a vagrant virtual machine and create a CakePHP 3 application.