Symfony2: Version and Install Steps

This post marks the start of a series of Symfony2 focused entries, describing how to install Symfony2 and prepare the environment for a new project. Relying on the "Installing and Configuring Symfony" chapter of the Symfony Book, this entry provides details about choosing the right version, and an introduction to composer; followed by step by step install instructions. 

Symfony2 Release Process

Symfony2 goes through a couple of release iterations. Every six months, starting in May, a new version is released; and maintained for 8 months, with an extra 6 months for security fixes. Long Term Support (LTS) releases are maintained for 3 years, and an extra year for security issues. At the time this article was published, version 2.3 was the latest LTS release, scheduled for support until 2016, and security maintenance until 2017.

The Latest LTS version can be checked here: http://symfony.com/roadmap.

Composer

The easiest way of installing Symfony2, is through Composer. Composer is a "tool for dependency management in PHP"; by keeping track of required libraries through user defined configuration files, and downloading packages in your project's folder. Written in PHP, it is made available as a PHP archive.

Installing Symfony2

  1. Install composer, outside your document root:
    curl -sS https://getcomposer.org/installer | php
    
  2. Install Symfony2:
    php composer.phar create-project symfony/framework-standard-edition /[path_to_symfony2]/ 2.3.0
    
    
  3. Configure for Symfony2:
    Following step 2, composer prompts for required configuration entries, saved in "app/config/parameters.yml". Adjust according to your requirements.
  4. Configure your Web Server:
    Point your document root to /full/[path_to_symfony2]/web/
    
  5. Finalize configuration:
    http://localhost/config.php provides details about last stage install steps

NOTE: The install steps above include Symfony2 vendors. To install Symfony2 without vendors (third-party dependencies), follow steps from:

http://symfony.com/doc/current/book/installation.html#using-source-control

Leave a Reply

Your email address will not be published. Required fields are marked *