First, bump your phoenix in mix.exs
:
def deps do
[{:phoenix, "~> 0.14"}, ...
end
Update your phoenix_html
version to 1.1.0
in mix.exs
:
def deps do
[{:phoenix, "~> 0.14"},
{:phoenix_html, "~> 1.1"}, ...
end
then run $ mix deps.get
1.1 raises on missing assigns in your templates. If you had cases where you were using assigns that may or may not have been set, update your code as so:
0.13.x
<%= if @message do %>
0.14.0
<%= if assigns[:message] do %>
plug :action
is now called automatically as the last plug in your controller. Simply remove it, ie:
0.13.x:
defmodule App.Controller do
use App.Web, :controller
plug :authenticate
plug :action
def show(conn, params) do
...
end
end
0.14.0:
defmodule App.Controller do
use App.Web, :controller
plug :authenticate
def show(conn, params) do
...
end
end
The default template web/templates/layout/application.html.eex
has been renamed to app.html.eex
. Simply rename this file:
$ mv web/templates/layout/application.html.eex web/templates/layout/app.html.eex
The :format
option in :render_errors
has been renamed to :default_format
. Update your config/*.exs
accordingly.
The Redis PubSub adapter has been extracted into its own project. If using redis, see the project's readme for installation and configuration instructions
Upgarde to the latest phoenix.js client by replacing web/static/vendor/phoenix.js
with the latest version: https://raw.githubusercontent.com/phoenixframework/phoenix/6da5a66a11ff02e5629e3512649413afe9257bc7/priv/static/phoenix.js
Socket params can now be added to apply default, overridable params to all channel params, ie
let socket = new Phoenix.Socket("/ws", {params: {userToken: theToken}})
Logging has been enhanced. To enable logging, or add customized logging of events, add a callback to the socket options, ie:
let socket = new Phoenix.Socket("/ws", {
logger: (kind, msg, data) => { console.log(${kind}: ${msg}, data) }
})
Two notes:
mix deps.get
gave me an error:I had to run
mix deps.update phoenix_live_reload
to resolve the lock and getphoenix_live_reload
0.4.2.phoenix.js
is located inweb/static/vendor
, notweb/static/js/vendor
.