How do you upgrade Phoenix and make sure all relevant changes are done?

I’ve gone through a couple of Phoenix minor version upgrades for one of my projects now, and we’re getting a lot of new features, fixes and enhancements all the time which is awesome!

However I sometimes feel like I’m struggling a bit with getting the upgrade done, and feeling confident that I’ve “done it right”. Let me explain a bit more.

Going from 1.7 to 1.8 was easy to just get it working. A lot of the new features are optional, and the old way of doing things still work (e.g. layouts via put_layout instead of functional components). However as I looked at the diffs I realized there were a lot of other small improvement I wanted to include (https://www.phoenixdiff.org). I found that a some of them weren’t even mentioned in the changelog for 1.8 ( Changelog for v1.8 — Phoenix v1.8.1 ). I recognize a lot of this is because it’s not the phoenix package itself that introduced the new feature, but perhaps phoenix_live_view or similar.

How do you go about Phoenix minor version upgrades? phoenixdiff? assuming the changelog includes the important stuff? upgrade guides / blog posts? some other smarter way I don’t know of?

How can we do better here? I have some time to spare and would love to help out. It would be great to know what y’all think is the most valuable thing we could do to make the upgrades smoother before I jump into something though.

6 Likes

I’m also doing a manual process of following diffs (not relying solely on changelogs), including looking at changes to the multiple generator templates in the Phoenix repo.

For instance, when going from 1.7 to 1.8 I decided to stay on Tailwinds v3 for now.

But I picked up configuration changes, improvements to live reloader, new LiveView features, etc.

I’m aware of Igniter, which probably could be used to automate some of the work, though I haven’t used it. In the end of the day it depends whether you want a tool to make decisions for you or if you want to keep tighter control.

As a project grows and deviates from the “starter kit” of a barebones Phoenix project, I feel the best blessing we have is backwards compatibility and not having to change your whole app to be able to upgrade.

2 Likes

Thanks @rhcarvalho - great to hear that you’re doing it in a similar fashion. Feels good to know that I’m not going about it in a completely dumb way, and everyone else has a much more clever way of doing it :).

P.S.
I did eventually decided to upgrade to Tailwind v4 as part of my Phx 1.7 → 1.8 upgrade. It was definitely the area I had to put in the most amount of hours to get it working right!

P.S.2
I share your feelings towards Igniter, but I have to admit I haven’t even properly tried it yet. I should probably do that some day to get a feel for it.

2 Likes