View Source Changelog for v1.7
See the upgrade guide to upgrade from Phoenix 1.6.x.
Phoenix v1.7 requires Elixir v1.11+.
introduction-of-verified-routes
Introduction of Verified Routes
Phoenix 1.7 includes a new Phoenix.VerifiedRoutes feature which provides ~p
for route generation with compile-time verification.
Use of the sigil_p macro allows paths and URLs throughout your
application to be compile-time verified against your Phoenix router(s).
For example the following path and URL usages:
<.link href={~p"/sessions/new"} method="post">Sign in</.link>
redirect(to: url(~p"/posts/#{post}"))Will be verified against your standard Phoenix.Router definitions:
get "/posts/:post_id", PostController, :show
post "/sessions/new", SessionController, :createUnmatched routes will issue compiler warnings:
warning: no route path for AppWeb.Router matches "/postz/#{post}"
lib/app_web/controllers/post_controller.ex:100: AppWeb.PostController.show/2Note: Elixir v1.14+ is required for comprehensive warnings. Older versions will work properly and warn on new compilations, but changes to the router file will not issue new warnings.
This feature replaces the Helpers module generated in your Phoenix router, but helpers
will continue to work and be generated. You can disable router helpers by passing the
helpers: false option to use Phoenix.Router.
1-7-0-2023-02-24
1.7.0 (2023-02-24)
bug-fixes
Bug Fixes
- Fix race conditions in the longpoll transport by batching messages
1-7-0-rc-3-2023-02-15
1.7.0-rc.3 (2023-02-15)
enhancements
Enhancements
- Use stream based collections for
phx.gen.livegenerators - Update
phx.gen.livegenerators to usePhoenix.Component.to_form
1-7-0-rc-2-2023-01-13
1.7.0-rc.2 (2023-01-13)
bug-fixes-1
Bug Fixes
- [Router] Fix routing bug causing incorrect matching order on similar routes
- [phx.new] Fix installation hanging in some cases
1-7-0-rc-1-2023-01-06
1.7.0-rc.1 (2023-01-06)
enhancements-1
Enhancements
- Raise if using verified routes outside of functions
- Add tailwind.install/esbuild.install to mix setup
bug-fixes-2
Bug Fixes
- [Presence] fix task shutdown match causing occasional presence errors
- [VerifiedRoutes] Fix expansion causing more compile-time deps than necessary
- [phx.gen.auth] Add password inputs to password reset edit form
- [phx.gen.embedded] Fixes missing :references generation to phx.gen.embedded
- Fix textarea rendering in core components
- Halt all sockets on intercept to fix longpoll response already sent error
1-7-0-rc-0-2022-11-07
1.7.0-rc.0 (2022-11-07)
deprecations
Deprecations
Phoenix.Controller.get_flashhas been deprecated in favor of the newPhoenix.Flashmodule, which provides unified flash access
enhancements-2
Enhancements
- [Router] Add
Phoenix.VerifiedRoutesfor~p-based route generation with compile-time verification. - [Router] Support
helpers: falsetouse Phoenix.Routerto disable helper generation - [Router] Add
--info [url]switch tophx.routesto get route information about a url/path - [Flash] Add
Phoenix.Flashfor unfied flash access
javascript-client-bug-fixes
JavaScript Client Bug Fixes
- Fix heartbeat being sent after disconnect and causing abnormal disconnects
Changelog for v1.6
See the upgrade guide to upgrade from Phoenix 1.5.x.
Phoenix v1.6 requires Elixir v1.9+.
1-6-15-2022-10-26
1.6.15 (2022-10-26)
enhancements-3
Enhancements
- Support for Phoenix.View 2.0
javascript-client-bug-fixes-1
JavaScript Client Bug Fixes
- Fix heartbeat reconnect
1-6-14-2022-10-10
1.6.14 (2022-10-10)
- Fix security vulnerability in wildcard
check_originconfigurations
1-6-13-2022-09-29
1.6.13 (2022-09-29)
enhancements-4
Enhancements
- [phx.gen.release] Fetch compatible docker image from API when passing
--dockerflag
1-6-12-2022-09-06
1.6.12 (2022-09-06)
bug-fixes-3
Bug Fixes
- Fix
phx.gen.releaseDockerfile pointing to expired image
1-6-11-2022-07-11
1.6.11 (2022-07-11)
javascript-client-enhancements
JavaScript Client Enhancements
- Add convenience for getting longpoll reference with
getLongPollTransport
javascript-client-bug-fixes-2
JavaScript Client Bug Fixes
- Cancel inflight longpoll requests on canceled longpoll session
- Do not attempt to flush socket buffer when tearing down socket on
replaceTransport
1-6-10-2022-06-01
1.6.10 (2022-06-01)
javascript-client-enhancements-1
JavaScript Client Enhancements
- Add
pingfunction to socket
1-6-9-2022-05-16
1.6.9 (2022-05-16)
bug-fixes-4
Bug Fixes
- [phx.gen.release] Fix generated .dockerignore comment
1-6-8-2022-05-06
1.6.8 (2022-05-06)
bug-fixes-5
Bug Fixes
- [phx.gen.release] Fix Ecto check failing to find Ecto in certain cases
1-6-7-2022-04-14
1.6.7 (2022-04-14)
enhancements-5
Enhancements
- [Endpoint] Add Endpoint init telemetry event
- [Endpoint] Prioritize user :http configuration for ranch to fix inet_backend failing to be respected
- [Logger] Support log_module in router metadata
- [phx.gen.release] Don't handle assets in Docker when directory doesn't exist
- [phx.gen.release] Skip generating migration files when ecto_sql is not installed
javascript-client-enhancements-2
JavaScript Client Enhancements
- Switch to .mjs files for ESM for better compatibility across build tools
javascript-client-bug-fixes-3
JavaScript Client Bug Fixes
- Fix LongPoll callbacks in JS client causing errors on connection close
1-6-6-2022-01-04
1.6.6 (2022-01-04)
bug-fixes-6
Bug Fixes
- [Endpoint] Fix
check_origin: :connfailing to match scheme
1-6-5-2021-12-16
1.6.5 (2021-12-16)
enhancements-6
Enhancements
- [Endpoint] Support
check_origin: :connto enforce origin on the connection's host, port, and scheme
1-6-4-2021-12-08
1.6.4 (2021-12-08)
bug-fixes-7
Bug Fixes
- Fix incorrect
phx.gen.releaseoutput
1-6-3-2021-12-07
1.6.3 (2021-12-07)
enhancements-7
Enhancements
- Add new
phx.gen.releasetask for release and docker based deployments - Add
fullsweep_afteroption to the websocket transport - Add
:force_watchersoption toPhoenix.Endpointfor running watchers even when web server is not started
bug-fixes-8
Bug Fixes
- Fix Endpoint
log: falsefailing to disable logging
javascript-client-bug-fixes-4
JavaScript Client Bug Fixes
- Do not attempt to reconnect automatically if client gracefully closes connection
1-6-2-2021-10-08
1.6.2 (2021-10-08)
bug-fixes-9
Bug Fixes
- [phx.new] Fix external flag to esbuild using incorrect syntax
1-6-1-2021-10-08
1.6.1 (2021-10-08)
enhancements-8
Enhancements
- [phx.new] Add external flag to esbuild for fonts and image path loading
- [phx.gen.auth] No longer set
argon2as the default hash algorithm forphx.gen.authin favor of bcrypt for performance reasons on smaller hardware
bug-fixes-10
Bug Fixes
- Fix race conditions logging debug duplicate channel joins when no duplicate existed
javascript-client-bug-fixes-5
JavaScript Client Bug Fixes
- Export commonjs modules for backwards compatibility
1-6-0-2021-09-24
1.6.0 (2021-09-24) 🚀
enhancements-9
Enhancements
- [ConnTest] Add
path_params/2for retrieving router path parameters out of dynamically returned URLs.
javascript-client-bug-fixes-6
JavaScript Client Bug Fixes
- Fix LongPoll transport undefined readyState check
1-6-0-rc-1-2021-09-22
1.6.0-rc.1 (2021-09-22)
enhancements-10
Enhancements
- [mix phx.gen.auth] Validate bcrypt passwords are no longer than 72 bytes
- re-enable
phx.routestask to support back to back invocations, such as for aliased mix route tasks - [mix phx.gen.html] Remove comma after
for={@changeset}onform.html.heex
javascript-client-bug-fixes-7
JavaScript Client Bug Fixes
- Fix messages for duplicate topic being dispatched to old channels
1-6-0-rc-0-2021-08-26
1.6.0-rc.0 (2021-08-26)
enhancements-11
Enhancements
- [CodeReloader] Code reloading can now pick up changes to .beam files if they were compiled in a separate OS process than the Phoenix server
- [Controller] Do not create compile-time dependency for
action_fallback - [Endpoint] Allow custom error response from socket handler
- [Endpoint] Do not require a pubsub server in the socket (only inside channels)
- [mix phx.digest.clean] Add
--allflag tomix phx.digest.clean - [mix phx.gen.auth] Add
mix phx.gen.authgenerator - [mix phx.gen.context] Support
enumtypes and theredactoption when declaring fields - [mix phx.gen.notifier] A new generator to build notifiers that by default deliver emails
- [mix phx.new] Update
mix phx.newto require Elixir v1.12 and use the newconfig/runtime.exs - [mix phx.new] Set
plug_init_mode: :runtimein generatedconfig/test.exs - [mix phx.new] Add description to Ecto telemetry metrics
- [mix phx.new] Use
Ecto.Adapters.SQL.Sandbox.start_owner!/2in generators - this approach provides proper shutdown semantics for apps using LiveView and Presence - [mix phx.new] Add
--installand--no-installoptions tophx.new - [mix phx.new] Add
--database sqlite3option tophx.new - [mix phx.new] Remove usage of Sass
- [mix phx.new] New applications now depend on Swoosh to deliver emails
- [mix phx.new] No longer generate a socket file by default, instead one can run
mix phx.gen.socket - [mix phx.new] No longer generates a home page using LiveView, instead one can run
mix phx.gen.live - [mix phx.new] LiveView is now included by default. Passing
--no-livewill comment out lines inapp.jsandEndpoint - [mix phx.server] Add
--openflag - [Router] Do not add compile time deps in
pipe_through - [View] Extracted
Phoenix.Viewinto its own project to facilitate reuse
javascript-client-enhancements-3
JavaScript Client Enhancements
- Add new
replaceTransportfunction to socket with extendedonErrorAPI to allow simplified LongPoll fallback - Fire each event in a separate task for the LongPoll transport to fix ordering
- Optimize presence syncing
bug-fixes-11
Bug fixes
- [Controller] Return normalized paths in
current_path/1andcurrent_path/2 - [mix phx.gen.live] Fix a bug where tests with
utc_datetimeandbooleanfields did not pass out of the box
javascript-client-bug-fixes-8
JavaScript Client Bug fixes
- Bind to
beforeunloadinstead ofunloadto solve Firefox connection issues - Fix presence onJoin including current metadata in new presence
deprecations-1
Deprecations
- [mix compile.phoenix] Adding the
:phoenixcompiler to yourmix.exs(compilers: [:phoenix] ++ Mix.compilers()) is no longer required from Phoenix v1.6 forward if you are running on Elixir v1.11. Remove it from yourmix.exsand you should gain faster compilation times too - [Endpoint] Phoenix now requires Cowboy v2.7+
breaking-changes
Breaking changes
- [View]
@view_moduleand@view_templateare no longer set. UsePhoenix.Controller.view_module/1andPhoenix.Controller.view_template/1respectively, or pass explicit assigns fromPhoenix.View.render.
v1-5
v1.5
The CHANGELOG for v1.5 releases can be found in the v1.5 branch.