Finally have some time to update one of my personal website (http://www.hostpohotocontest.com) from Symfony 1 to Symfony 2 framework.
Below are the noticeable differences i encounter when migrating to Symfony 1 to 2.
I will update this list from time to time whenever i have the time and energy to do so.
The Good
- The concept of the framework is similar to Symfony 2.
- Unlike Symfony1, which multiple applications (e.g. frontend and backend) using the one single framework API, everything in Symfony 2 is bundles. The frontend twig, is a bundle, the framework is a bundle.
- There is no ‘plugin’ concept. Everything is a bundle.
- Twig looks good. Write lesser code for view layer.
- Most of the generator are still available in Symfony 1
- Composer makes installing third party bundles easy!
- Want to overwrite or extend third party’s controller without updating their codes directly? Yes it can be done easily in Symfony 2. This is good in the sense that if you update third party bundles, you can be assured that your own ‘manual override’ codes still remain intact.
The Bad
- sfguard is not available in Symfony2. Yes. its a nightmare to migrate this over, especially that the encyrption implemented in symfony 2 is different.
- I found a a replacement of sfguard = FOSUserBundle bundle. Will update my progress on this along the way
- If you are using timestampable fields like me (i.e created_at, updated_at, deleted_at), these features does not come with Symfony2 by default, you need to install a DoctrineExtension bundle from STOF
The Ugly
- You need to re-code everything over. The directory structure and the codes are totally different in Symfony 2.
And… I will keep track of the weekends i spent on re-writing my codes over.