Git is used to checkout and interact with this training repository. You should be able to execute the 'git' command from your command-line interface.
See GitHub's Setup Documentation.
Setup a working AMP (Apache, MySQL, PHP) stack that satisfies these minimum requirements:
- PHP 5.3.3 or higher (PHP 5.4+ recommended)
- A web server: either Apache or the server built into PHP 5.4+.
Several pre-packaged installers are available, as well as compelling virtual machine and cloud-based options. Some of these options are listed here:
- Multi-platform: XAMPP, AMPPS
- OS X: MAMP, php-osx
- Windows: WAMP
- Linux: Use your Linux distribution's package manager to install Apache, MySQL, and PHP.
Nitrous.io is a cloud-based development environment that offers a free trial which should be sufficient to complete the activities in this training.
Vagrant is a cross-platform tool for standardizing and automating the management of virtual machines.
-
Obtain a suitable Vagrant box (an example is suggested in the following comand)
$ git clone -–branch master http://git.drupal.org/project/vm.git symfony.dev
-
Adjust virtual machine parameters as needed:
$ cp parameters.yml.dist parameters.yml
-
Boot the machine
$ vagrant up
Composer is a tool for managing dependencies for PHP projects.
Follow the directions on the Composer site for installation.
Clone this repo into a subdirectory of your web document root.
$ git clone https://github.com/jmolivas/introduction-to-symfony2-getting-ready-for-d8.git training
Change into the training directory you created in the previous step, then initialize Symfony with Composer:
$ cd training
$ composer install
You will be prompted for several configuration settings. In each case, you may just press enter to accept the default value.
Symfony includes a script to confirm your setup can run Symfony successfully. You can run this from the command line:
$ php app/check.php
The output of check.php
will indicate if there are any errors with your environment and how they may impact your ability to use Symfony.
PHP 5.4+ includes a local server that is ideal for local development. To run it, make sure you are in the training directory and execute the following command:
$ php app/console server:run
If you point your browser at http://localhost:8000
, you should see a "Welcome!" page generated by Symfony.
Note: The URL you use may be different if you are using a Virtual Machine (Vagrant) or a cloud-based development environment (Nitrous.io).
This repository includes branches that correspond with the main phases of the training session. If you wish to skip to a step, you may switch branches with:
$ git checkout -f <branch>
Note: The "-f" discards any changes you have made to the code!