Phoenix 1.8.0
Elixir Phoenix
My goal here:
What’s new in Phoenix 1.8.0?
Versions
- 1.7.0 Nov 2022
- 1.7.21 Mar 2025
- 1.8.0-rc.0 Apr 2025
- 1.8.0-rc.4 Jul 2025
Dependencies
Http client
- https://hexdocs.pm/finch
+ https://hexdocs.pm/req
Html parser (test only)
- https://hexdocs.pm/floki
+ https://hexdocs.pm/lazy_html
JS land => Go to Editor
export PLUG_EDITOR=cursor://file/__FILE__:__LINE__
JS land => Server Logs in Browser
- enableServerLogs
- new config
web_console_logger: true
- new config
JS land => Inline hooks
CSS land
- daisyUI
- dark/light themes setup already
Authentication
- new magic link authentication
- password authentication is optional
Authentication => Scope
- new
Scope
module in the place ofcurrent_user
defmodule MyApp.Accounts.Scope do
alias MyApp.Accounts.User
defstruct user: nil
def for_user(%User{} = user), do: %__MODULE__{user: user}
def for_user(nil), do: nil
end
Code Generators
- Scope
- PubSub/broadcast
- inline HEEX in
render
- no more modals
Web
- new Layouts structure
- from html.heex files to Heex functional components
- theme toggle
- Layout is added explicitly at
render
def render(assigns) do
~H"""
<Layouts.app flash={@flash} current_scope={@current_scope}>
...
</Layouts.app>
end
CoreComponents
modal
was removed => daisyUIsimple_form
was removedvariant
was added to thebutton
component