Symfony: How to refactor

Warning! This post is either deprecated or outdated.

Last year, my team and I, needed to create a new web application. We decided to make use of a well known PHP framework called Symfony. Not because some say this is the best framework, but because …

  • It is Enterprise Ready
  • Has many plug-ins available
  • It is Actively developed
  • (most important) A great community and documentation
  • Integrated Unit Testing

Although symfony has a good implemented MVC architecture with a lot of helpful functions, it is still very easy to make some design mistakes, like the DRY (Do not Repeat Yourself) principle. Fabien Potencier, lead developer of symfony, recently refactored an existing web project which he wrote down in the symfony blog.

If you work with symfony, you really should read this refactoring session because I’m pretty sure somewhere in your code you made the same mistake(s).

Call the expert: A refactoring story (Part 1, Part 2, Part 3, Part 4, Part 5)

By the way, if you found a typo, please fork and edit this post. Thank you so much! This post is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

Comments

Fork me on GitHub