Phoenix Framework 1.3.0 RC3 is out

This release candidate is the las one for version 1.3.0
25 July 2017   1514

Good news for all Elixir coders and especially for Phoenix fans. New, 3rd and last release candidate of version 1.3.0 is finally out.

According to the developers, the final release of version 1.3.0 is planned later this week. 

Let's check what's inside!

Directory Changes

The "web" directory has been moved from lib/my_app/web, to lib/my_app_web. This change makes a clearer separation between your greater Elixir application and the web interface to it. The new convention also aligns more closely to the umbrella application structure, so it will be a more natural step to go from a single application to an umbrella application in the future. For example, the new structure produced by mix phx.new looks as follows:

lib
├── my_app
│   ├── application.ex
│   └── repo.ex
├── my_app.ex
└── my_app_web
|   ├── channels
|   ├── controllers
|   ├── endpoint.ex
|   ├── gettext.ex
|   ├── router.ex
|   ├── templates
|   ├── views
└── my_app_web.ex

Web alias changes

The MyApp.Web alias has been renamed to MyAppWeb. This removes a special-case naming convention we had that went against common Elixir conventions when it comes to naming umbrella applications.

New Channel V2 wire protocol

rc.3 also includes a backwards-compatible, V2 of our channel wire protocol. The new protocol resolves a race condition that was discovered under some messaging circumstances. The new format also includes improved data compaction when serializing. The updated phoenix.js client will use V2, but older clients unable to speak the new protocol will continue to work as before.

Dynamic Endpoint config changes

The rc.0-2 on_init configuration is no longer supported. Instead of on_init, add the load_from_system_env: true to your endpoint config, then define an init/2 clause in your endpoint module. For example:

config :my_app, MyAppWeb.Endpoint,
  ...,
  load_from_system_env: true,

and then in your endpoint:

@doc """
  Callback invoked for dynamically configuring the endpoint.

  It receives the endpoint configuration and checks if
  configuration should be loaded from the system environment.
  """
  def init(_key, config) do
    if config[:load_from_system_env] do
      port = System.get_env("PORT") || raise "expected the PORT environment variable to be set"
      {:ok, Keyword.put(config, :http, [:inet6, port: port])}
    else
      {:ok, config}
    end
  end

Context Generator changes

The mix phx.gen.html|json|context generators no longer namespace tables by the context name, preferring to simply name the table after the given resource.

You can learn more at Elixir forum.

Elixir v1.7.0-rc.0 Released

Development team ask community to try out new release 
17 July 2018   195

Elixir team rolled out zero release candidate for version 1.7.0.

Hi everyone,

We have just released v1.7.0-rc.0.

Please give it a try! You can either compile the v1.7 branch from source OR use the precompiled files, as described in our install page 11.

Note that you will need {:ex_doc, "~> 0.19-rc"}if you want to generate docs using the release candidate.

Happy coding!
 

josevalim

Creator, Elixir

Currently Elixir supports two metadata keys: :deprecated and :since. Other keys will be added in the future. 

To access the new documentation, developers should use Code.fetch_docs/1. The old documentation format is no longer available and the old Code.get_docs/1 function will return nil accordingly.

Tools like IEx and ExDoc have been updated to leverage the new format and show relevant metadata to users

Learn more at GitHub