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
end0.14.0:
defmodule App.Controller do
use App.Web, :controller
plug :authenticate
def show(conn, params) do
...
end
endThe 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) }
})
There is also a new
gzipoption forPlug.Static, the newendpoint.exgenerated by Phoenix looks like this: