yurko

yurko

Is there an upgrade Guide for Phoenix 1.8?

There used to be a gist with upgrade instructions for each new Phoenix version. For example here Phoenix 1.7.0 released: Built-in Tailwind, Verified Routes, LiveView Streams, and what's next - Phoenix Blog it is linked at the bottom under “As always, step-by-step upgrade guides are there to take your existing 1.6.x apps up to 1.7.“ (phoenix-1.6.x-1.7-upgrade.md · GitHub).

With 1.8 I see no such link here Phoenix 1.8.0 released! - Phoenix Blog in search only this article shows up Migrate to Phoenix 1.8 guide - DEV Community but it’s not official guide and it uses RC, not the released version. I can still do the minimum necessary changes using changelog ( Changelog for v1.8 — Phoenix v1.8.8 ) but the guides helped with optional changes - seing what needs to be done saved time. Are we left with changelog and diffs from now on or am I missing something?

Most Liked

informatom

informatom

I have never ever experienced such a bad upgrade process as with Phoenix 1.7 to 1.8.

First there is no official upgrade guide.

Tailwind asset pipeline with esbuild was broken, surface component library recommends updating all forms to .form, DaisyUi is suddenly introduced, but the generated apps don’t introduce it the way, the tailwind hex module does.

Now y classic views (I refuse to call them dead views) try to load a LayoutView of the form MyAppWeb.ControllernameMyApp.LayoutView which obviously is not existing. The layout ‘simplification’ breaks my app completely. Migration to LiveView all over the app seems to be mandatory.
Maybe it’s because I denied to switch to scopes which also only would have introduced an unnecessary level of complexity.
I don’t know, I don’t want to blame anybody, but it’s super frustrating. I am currently thinking about dropping a codebase of 2k+ hours of work.

LostKobrakai

LostKobrakai

Can confirm. It’s just needed for colocated JS atm.

arcanemachine

arcanemachine

I ended up pretty much where you’re describing, and ended up working piece-by-piece through a diff to get things working.

It was not a particularly enjoyable upgrade, but it was nice to be able to rip out the few remaining npm dependencies in the project that I upgraded (type definitions and daisyUI v4).

Last Post!

conradwt

conradwt

@informatom Yes, I found myself in the exact situation. Thus, I first generated Phoenix 1.8, and then migrated the changes over to my Phoenix 1.7 app. Also, I watched the relevant Pragmatic Studio’s Full-stack Phoenix course videos for upgrading from Phoenix 1.7 to 1.8. This really provided the finishing touches to migrate the generated auth system and add the scope-related updates.

Next, DaisyUI is a nice high-level component library for Tailwind, but I personally prefer working directly with Tailwind utility classes; no middleman needed here. Why? I’m dependent on the DaisyUI team keeping up with Tailwind’s development pace. Furthermore, I would like to follow Wathan’s recommendations for using Tailwind by avoiding @apply and leveraging components. Thus, it may be better to have a command-line option to generate an app to use Tailwind utility classes instead of the default, DaisyUI. For example,

mix phx.new my_awesome_app --css=tailwind

In short, this really felt like I was upgrading my Phoenix 1.7 app to Phoenix 2.0 instead of Phoenix 1.8. Next, the process would have been made much easier if there were official upgrade documentation from the Phoenix core team.

Where Next?

Popular in Questions Top

nobody
How to bind a phoenix app to a specific ip address? could not find anything about that, nowhere, unfortunately, but for me this is quite...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
earth10
Hi, I’m just starting to build a side-project with Elixir and Phoenix and doing some basic test with Elixir alone. What strikes me is th...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

Other popular topics Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
274 42158 114
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 39523 209
New
AstonJ
Please see the new poll here: Which code editor or IDE do you use? (Poll) (2022 Edition) It’s been a while since we first asked this, I...
208 31307 143
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New

We're in Beta

About us Mission Statement