EN RU
Contact us

Increasing Project Productivity in Symfony2 with Doctrine2 ORM

Increasing project productivity in Symfony2 from Doctrine2 ORM

I have been trying to write this Doctrine 2 ORM tutorial for a long time but just couldn’t get down to it. Finally, I pulled myself together and did it. So here I’m sharing some techniques for working with Doctrine2 ORM which will help to improve the site performance on Symfony2 (precisely any site that uses Doctrine2 ORM). I have created a project and put it on a GitHub as a visual guide so anyone can test my words in action now.

Deploying Symfony2 applications on Heroku Cloud

Heroku Cloud Symfony2 application deployment

When working on my small home project on Symfony2, I needed to deploy it on staging for testing API from the outside. Sure, you need some hosting for this purpose: either have it already or buy it. Yet there is an alternative — the cloud services where you can host your site for free but with limited resources. There are a lot of such services now and they are competing with each other. Somehow I decided to try Heroku. I heard about it a long time ago and at that point it crossed my mind. I didn’t look on other services, this time I just wanted to try my luck with Heroku. Fortunately, Heroku still has a free web hosting option so I started to search all the information needed for Symfony2 application deployment.

Symfony2 site deployment using Capifony

Symfony2 site deployment using Capifony

Capifony is a smart and convenient tool to deploy Symfony sites. It’s based on Capistrano and is written by Konstantin Kudryashov. Basic information on working with Capifony can be gleaned from the official site capifony.org and the short article "Deploy Your Symfony Application Painlessly with Capifony".

I advise you to start deploying symfony2 with capifony it on the server manually and make sure everything is configured and operating correctly (especially the script app / console). For example, I found some incorrect ways for the git sub modules and failed to deploy the site from the first turn.

Below the cut is a Capifony config to deploy this site and my comments to it.