tfwright / live_admin

Low-config admin UI for Phoenix apps, built on LiveView
MIT License
248 stars 22 forks source link

Fix compatibility issue with phoenix_html 4.0 #108

Closed obieewan closed 3 months ago

tfwright commented 3 months ago

Hi @obieewan bit confused here since I haven't seen any errors around this and phoenix_html has been locked to 4 for while now. Can you give a bit more context on the source of the problem this fixes?

obieewan commented 3 months ago

Hello @tfwright , I encountered this error when I compile the app after adding this as dependency:

Screenshot 2024-04-01 at 10 30 47

This is my current setup:

Screenshot 2024-04-01 at 10 32 36
eriknaslund commented 3 months ago

I had the same issue, and I think I figured out why.

I added {:live_admin, "~> 0.11.4"} to my mix.exs, and I got the same error message ("use Phoenix.HTML is no longer supported in v4.0"). Looking through the code that got pulled I can indeed see lots of use Phoenix.HTML.

It seems like it was all fixed in this commit: https://github.com/tfwright/live_admin/commit/364653d39a51f5b1edd46f113aaff48e83bf30f3 This commit is from Feb 3rd, which is after the release of 0.11.4 (Jan 29), so it's not included in the latest release.

I pulled the live_admin code from latest main here on Github and voila - everything works :) All we need here is probably a new release to hex.pm.

tfwright commented 3 months ago

Released https://hex.pm/packages/live_admin/0.11.5