Is your code ready for the Symfony 3.0 upgrade next month?

New Symfony update coming soon

It’s not long now (approximately one month to go) before the major new Symfony release, Symfony 3.0. The new version sees the removal of all functions marked deprecated in version 2 releases, the result of which is that code which still contains deprecations won’t work. This got me wondering to what extent my own code meets the requirements of the new upgrade. Often, when we’re writing an application it can be easy to forget about the compatibility of our code with different versions of our favorite framework, Symfony.

Help getting ready

Recently the official Symfony framework blog told us about a new tool, that can be used to verify the compliance of your code with the requirements of the new version.

I decided to try out the “Deprecation Detector” for myself. I wrote a small application and applied the tool, this is what happened:deprecation detector

From this screen we can see that some paths of the application didn’t verify because they were generated using the sensio/generator-bundle. I like to use the generator for creating forms as it helps to quickly make a FormType structure for the entity. Anyway, the tool helped to identify exactly which bits of my code would cause an obstacle in Symfony 3.0 and once the deficiencies were identified I was able to correct them quickly enough.

One step closer

Although they claim that it’s still in an early stage of development, the tool already seems like a helpful way to check your code’s compatibility. So now our applications are one step closer to being ready for the release of version 3.0. What about yours?