Skip to content
This repository was archived by the owner on Nov 23, 2018. It is now read-only.

Preparing a development environment

Whymarrh Whitby edited this page Jul 15, 2013 · 7 revisions

You will need to have a few tools at your disposal to contribute to the project. You will need:

  • Git
  • Apache HTTP Server
  • PHP 5.4+ (with PDO, cURL, and the SQLite driver)
  • Composer
  • PHPUnit
  • SQLite 3+

The ease of installing these tools will depend greatly on your environment.

OS X

Git

To install Git on OS X, you can download the installer from the Git website. Running the installer will put Git in /usr/local/git/bin -- add this directory to your PATH environment variable. If you fancy a GUI for Git, consider using one of the many tools listed on the Git website under GUI Clients that are available for Mac, such as GitHub for Mac.

Once Git is installed, you can clone the project into the directory of your choice. If you are using the CLI for Git, run the following in a shell:

cd /path/to/project
git clone git@github.com:<your username>/<your fork name>.git

Apache and PHP (with extensions)

To install Apache, MySQL, and PHP, you can download and install MAMP. Once installed, edit the /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf file and add a virtual host definition that points to the directory into which you cloned the project.

Your virtual host definition should look something similar to:

<VirtualHost *:80>
    DocumentRoot "/path/to/project/public"
    <Directory "/path/to/project/public">
        AllowOverride All
    </Directory>
    ServerName example.com
    ServerAlias www.example.com
</VirtualHost>

(The above assumes that port 80 is the port that Apache is listening on. Note that the default port is 8888. If you did not change the default port in the MAMP settings, change 80 to 8888.) Replace "example.com" with the domain name you of your choice.

Edit your /private/etc/hosts file and add the following line, replacing example.com and www.example.com with the domain name you used above:

127.0.0.1    example.com
127.0.0.1    www.example.com

Composer

The simplest way to get Composer is to run the following in a shell:

curl -O http://getcomposer.org/composer.phar
chmod +x composer.phar
sudo mv composer.phar /usr/local/bin/composer

PHPUnit

The simplest way to get PHPUnit is to run the following in a shell:

curl -O http://pear.phpunit.de/get/phpunit.phar
chmod +x phpunit.phar
sudo mv phpunit.phar /usr/local/bin/phpunit

SQLite 3+

SQLite comes installed by default on OS X.

Linux

Still to come.

Windows

One option is to develop on a virtual Linux machine (such as Vagrant) which would make the process of getting set up the same as the Linux platform (see Linux instructions above).

Clone this wiki locally