n00b-alert-3: Setting up Symfony2

Now that we have our development stack in place, we are going to install Symfony2, which is the PHP framework we will be using to develop our new system.

Installing Git

For version control, collaboration and backup of our codebase, we will be using Git, with our repositories hosted at GitHub. As I am working on Windows, I have chosen to use Git Extensions. Download and install this. Then we’re good to clone our respository from GitHub.

Clone repository

Find the respsitory and then copy the SSH URL from near the top of the page. Paste this into the Repository to clone field. Then select the Destination folder and also the subdirectory which we want to create for the repository. If there are any submodules which are referenced from the base repository, make sure that “Initialize all submodules” is checked, so we can pull all of them down from GitHub too.

Load SSH key

In order to authenticate with GitHub, we need to generate a public/private key with PuTTYGen and then upload the public key to the SSH Keys section of our GitHub account settings. Save the Private key locally then use this in the “Load SSH Key” part when importing the repository.

Now click the clone button to pull all the code down from GitHub and complete the local cloning of the repository.

Download Symfony2 dependancies with Composer

As part of our stack, the webserver running Zend Server has the basic Symfony2 framework installed. However, this is not much use, without all of the dependencies which make it fully functional.

If Symfony2 is not installed, go and follow the instructions on their download page. Download without vendors, so that we can have more fine grained control here with our dependancy management later on.

Log into the webserver via SSH:

As you can see we then need to run a Composer update in order to bring everything up to date:

Now we’re ready to start using (learning) Symfony2.

Leave a Reply