v0.16.0
版本发布时间: 2015-08-06 07:24:55
phoenixframework/phoenix最新发布版本:v1.5.3(2020-06-26 19:06:09)
See these 0.15.x
to 0.16.0
upgrade instructions to bring your existing apps up to speed.
- Enhancements
- [Brunch] No longer ship with
sass-brunch
dependency - [Endpoint] Add
force_ssl
support - [Mix] Allow
phoenix.gen.*
tasks templates to be customized by the target application by placing copies atpriv/template/phoenix.gen.*
- [Mix] Support
mix phoenix.gen.model Comment comment post_id:references:posts
- [Mix] Add
mix phoenix.gen.secret
- [Router] Provide
put_secure_browser_headers/2
and use it by default in the browser pipeline - [Socket] Automatically check origins on socket transports
- [Token] Add
Phoenix.Token
for easy signing and verification of tokens
- [Brunch] No longer ship with
- Bug fixes
- [Cowboy] Ensure we print proper URL when starting the server with both http and https
- [Digest] Do not gzip binary files like png and jpg. Default only to known text files and make them configurable via
config :phoenix, :gzippable_exts, ~w(.txt .html .js .css)
and so on
- Backward incompatible changes
- [Controller]
jsonp/3
function has been removed in favor of theplug :allow_jsonp
- [Controller]
controller_template/1
has been renamed toview_template/1
- [HTML] Use
phoenix_html ~> 2.0
which includes its ownphoenix_html.js
version - [Socket]
:origins
transport option has been renamed to:check_origin
- [View]
render_one
andrender_many
no longer inflect the view module from the model in favor of explicitly passing the view
- [Controller]
- JavaScript client backwards incompatible changes
- Socket params are now passed to
socket.connect()
instead of an option on the constructor. - Socket params are no longer merged as default params for channel params. Use
connect/2
on the server to wire up default channel assigns. - Socket
chan
has been renamed tochannel
, for examplesocket.channel("some:topic")
- Socket params are now passed to