EN UA RU
Contact us
Deploying Symfony2 applications on Heroku Cloud

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.

How to create a custom Param Converter in Symfony2?

How to create a custom Param Converter in Symfony2?

Writing custom ParamConverter in Symfony2

PHP-framework Symfony2 has a very nice component ParamConverter, which allows to convert parameters from URL into PHP variables. When the functionality that comes out of box isn’t enough, you should extend it manually. In this post I’ll show how to write your custom Symfony2 ParamConverter.

Code refactoring in PhpStorm

Code refactoring in PhpStorm

Code refactoring in PhpStorm

PHP refactoring is really cool! But in the process of fulfilling it, some routine operations and repetitive actions with the code are rather frequent. And in the end there still may remain a lot of syntax errors. Well it often kills any initiative. And surely this is not cool. Fortunately, modern IDE are able to take part of the tasks for themselves while the developer can concentrate on the process of refactoring of code and architecture as a whole, rather than on the fight against boring code.

Symfony2 site deployment using Capifony

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.