Greg Tyler

Weeknotes: 23rd March 2020

Published on 29th March 2020

This week I prepared the runway for Symfony 4.

Complete the deputy report currently runs on Symfony 3.4, which is falling out of support this November. Before then we’re planning to do a double upgrade to version 5. As well as giving us a supported version of the framework, we’ll be able to take advantage of the latest features and build a best-practice application.

However, a lot has changed between versions 3 and 5. And it turns out we never fully upgraded from version 2, so we’re lagging way behind where we need to be. We still need to switch properly to dependency injection, update our folder structure and change lots of peer dependencies.

A few years ago I would’ve laughed in the face of this task and “just done it”. I’d upgrade to version 5, start fixing things which don’t work, and inevitably have a code freeze during this whole process.

For the ensuing months I’d find things which didn’t work and weren’t covered by tests, things I didn’t fix properly, and improvements that I missed.

Fortunately, I’ve learnt from my experiences and am treating this now carefully. I’ve read through all the upgrade notes, identitied breaking changes that affect us and broken them down into manageable tasks.

Most importantly, I’ve identified which if these tasks can be done before actually performing the upgrade (as it turns out, most of them). So now we can slowly fix things in the background before taking the plunge. There’ll still be some issues I’m sure, but they’ll be easier to deal with because a lot of the noise is resolved.

After the version 4 upgrade is done, we’ll do the same for version 5: fix everything we can up-front then upgrade cleanly when ready.

There’s one big gap in my knowledge: Symfony Flex. I don’t yet understand what it’s for, how it works, or if we need it. I need to do more research to figure out what benefits it’ll give us and when is easiest to install (it’s new in version 4 but I suspect easiest to install after our version 5 upgrade is fully complete).

This task will be a marathon, not a sprint, and I’ll keep updated on how it progresses.