Symfony 2 or Symfony 1.4?

sqlman picture sqlman · Jul 26, 2011 · Viewed 7.3k times · Source

I am starting a new Symfony project that will be very important to my company. My experience is only with Symfony 1.4. and I have 3 months to complete the project.

The project should be around for years and will grow to have many features. I know that many people are already using Symfony 2 in production, but do you think it's a bad idea to go with 1.4?

Every situation is different. I don't see any problem with 1.4, but some people are suggesting I use Symfony 2 because eventually we will need to upgrade and do a lot of rewriting of code.

Plus, there is Doctrine 2. I would be using 1.2.4. Again, I know that Doctrine 2 is really great, but am I going off a cliff by sticking with 1.2.4? It seems to do everything we need.

Thanks for any insight.

Answer

Jeremy Kauffman picture Jeremy Kauffman · Jul 26, 2011

Why you should use Symfony 2.0:

  • Faster. Many Symfony components have seen performance improvements and it also now supports edge side includes.
  • Fixes weaker design. Symfony 1.x is great, but some components had flaws, like logging (now outsourced) and tasks (more flexible). Forms in 1.x were powerful, but had some flaws; forms in 2.0 are better.
  • It's the future. Symfony 1.x will expire before the lifetime of your project. You already said you will be rewriting it. It makes no sense to wait.
  • Cleaner, easier code. Namespaces, more decoupling, generally even more beautiful than Symfony 1.x was.
  • Doctrine 2.0. Way faster, way easier to use.

The only possible reason to go with 1.x is time concerns. However, if this project is that important, it makes more sense to increase the time limit (if it is unfeasible), then to do it in 1.x and waste all that time rewriting it later.