How to create first symfony2 project

This short tutorial is for beginner developers who want to start theirs first adventure with symfony2.

Of course i can’t write here about all aspects of configuring symfony2 but i will try my best to walk you through this issues:

  • Installation symfony2 by composer or manually
  • Dealing with common problems

Installation symfony2 by composer:

I’m assuming that you have already installed composer on your computer and know how to use it (if not please visit https://getcomposer.org/doc/00-intro.md).

To create symfony2 project you need to execute this command in console:

 

Post script will ask you few question:

You should probably focus here only on database part and leave rest as it is.

 

Installation symfony2 manually.

You can find full symfony2 package here http://symfony.com/download?v=Symfony_Standard_Vendors_2.5.6.zip

Download it and unpack content of symfony directory in your project directory.

Congratulation! You have installed your first

 

Dealing with common problems

Unwritable directories

If you face with something like this

RuntimeException: Unable to create the cache directory (/home/radek/Projekty/SymfonyStart2/app/cache/dev)

Please don’t panic. All you need to is change chmod for those directories to 777. And you should be ok.

Mar 20, 2015 | Posted by in Blog, PHP, Symfony 2 | 0 comments

Add Your Comment

Your email address will not be published.