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, :create
Unmatched 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/2
Note: 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
.
phx-new-revamp
phx.new revamp
The phx.new
application generator has been improved to rely on function components for
both Controller and LiveView rendering, ultimately simplifying the rendering stack of
Phoenix applications and providing better reuse.
New applications come with a collection of well-documented and accessible core components,
styled with Tailwind CSS by default. You can opt-out of Tailwind CSS with the --no-tailwind
flag (the Tailwind CSS classes are kept in the generated components as reference for
future styling).
1-7-7-2023-07-10
1.7.7 (2023-07-10)
enhancements
Enhancements
- Support incoming binary payloads to channels over longpoll transport
1-7-6-2023-06-16
1.7.6 (2023-06-16)
bug-fixes
Bug Fixes
- Suport websock_adapter 0.5.3
enhancements-1
Enhancements
- Allow using Phoenix.ChannelTest socket/connect in another process
1-7-5-2023-06-15
1.7.5 (2023-06-15)
bug-fixes-1
Bug Fixes
- Fix LongPoll error when draining connections
1-7-4-2023-06-15
1.7.4 (2023-06-15)
bug-fixes-2
Bug Fixes
- Fix the WebSocket draining sending incorrect close code when draining causing LiveViews to reload the page instead of reconnecting
1-7-3-2023-05-30
1.7.3 (2023-05-30)
enhancements-2
Enhancements
- Use LiveView 0.19 for new apps
bug-fixes-3
Bug Fixes
- Fix compilation error page on plug debugger showing obscure error when app fails to compile
- Fix warnings being printed twice in route verification
1-7-2-2023-03-20
1.7.2 (2023-03-20)
enhancements-3
Enhancements
- [Endpoint] Add socket draining for batched and orchestrated Channel/LiveView socket shutdown
- [code reloader] Improve the compilation error page to remove horizontal scrolling and include all warnings and errors from compilation
- [phx.new] Support the
--no-tailwind
and--no-esbuild
flags - [phx.new] Move heroicons to assets/vendor
- [phx.new] Simplify core modal to use the new JS.exec instruction to reduce footprint
- [sockets] Allow custom csrf_token_keys in WebSockets
1-7-1-2023-03-02
1.7.1 (2023-03-02)
enhancements-4
Enhancements
- [phx.new] Embed heroicons in app.css bundle to optimize usage
1-7-0-2023-02-24
1.7.0 (2023-02-24)
bug-fixes-4
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-5
Enhancements
- Use stream based collections for
phx.gen.live
generators - Update
phx.gen.live
generators to usePhoenix.Component.to_form
1-7-0-rc-2-2023-01-13
1.7.0-rc.2 (2023-01-13)
bug-fixes-5
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-6
Enhancements
- Raise if using verified routes outside of functions
- Add tailwind.install/esbuild.install to mix setup
bug-fixes-6
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_flash
has been deprecated in favor of the newPhoenix.Flash
module, which provides unified flash access
enhancements-7
Enhancements
- [Router] Add
Phoenix.VerifiedRoutes
for~p
-based route generation with compile-time verification. - [Router] Support
helpers: false
touse Phoenix.Router
to disable helper generation - [Router] Add
--info [url]
switch tophx.routes
to get route information about a url/path - [Flash] Add
Phoenix.Flash
for unfied flash access
javascript-client-bug-fixes
JavaScript Client Bug Fixes
- Fix heartbeat being sent after disconnect and causing abnormal disconnects
v1-6
v1.6
The CHANGELOG for v1.6 releases can be found in the v1.6 branch.