Phoenix 1.4.0 released!

phoenix-release

#61

no liveview? :frowning: cant wait for it, awesome relesase nevertheless


#62

LiveView will not be released in Phoenix. It is meant to be an external package maintained separately. I believe Chris said he was going to push for the release of Phoenix 1.4, and then put more time into LiveView. So we may start hearing more about it soonish.


#63

I ran into a difference that I have not seen documented anywhere yet. Not sure if this is intentional @chrismccord ??

Generated new project on my headless dev machine (not my Mac host). When accessing the page at http://xxx.xxx.xxx.xxx:4000, the static assets could not be found. I had to change the Endpoint url host from “localhost” to “xxx.xxx.xxx.xxx”.

Is this intentional? If so, is it intentional?

elixir 1.7.3
phoenix 1.4.0-rc.0


#64

I tracked down this problem to this pull request. The new layout template now includes full absolute URLs based on config instead of using relative paths.

This change also causes default css and js asset files to be served over HTTPS when user accesses the page through HTTP and HTTPS config is present (that’s what I had a problem with). Fortunately it’s just 2 lines to modify to change it back.


#65

I think static_path makes the most sense for the default asset references. When folks go to deploy with a CDN, they can change the static calls as neccessary. I’m going to push rc.1 with some other fixes and will revert the linked PR. Thanks!


#66

RC1 is out:

$ mix archive.install hex phx_new 1.4.0-rc.1

Existing apps on rc.0:

$ mix deps.update phoenix

Then bump your Phoenix Live Reload dep to 1.2.-rc: {:phoenix_live_reload, "~> 1.2-rc"},

1.4.0-rc.1 (2018-10-12)

Enhancements

  • [Socket] Improve error message when missing socket mount in endpoint

Bug Fixes

  • Add missing .formatter.exs to hex package for proper elixir formatter integration
  • [phx.gen.cert] Fix usage inside umbrella applications
  • [phx.new] Revert Routes.static_url in app layout in favor of original Routes.static_path
  • [phx.new] Use phoenix_live_reload 1.2-rc to fix hex version errors

JavaScript client

  • Fix reconnect caused by pending heartbeat

#67

Thanks Chris, A lot of love from Pakistan, Elixir (Phoenix) is the one programming language you cannot stay away or don’t love it.

New changes look nice, Congratulation on new release.


#68

Just to avoid confusion for anyone else, if you’ve already installed rc.0, first uninstall it: mix archive.uninstall phx_new-1.4.0-rc.0.


#69

Really excited about this. I’m just about to spin up a new project with phoenix at work, I’m I glad we can try to roll it out with 1.4!


#70

Yes, great job Chris and company!!

I did some testing with Coherence and expected some issues. Really didn’t find any. Nice backwards compatibility.


#71

I’m completely in line with you. There is a lot of cases where you wants to use the framework as it is, with enough functionalities to permit the development of a complete system, minimizing the amount of effort to find the packages required to complete the framework. Been there with Clojure 2 years ago. It was a pain to constitute a descend framework, analyzing dozen of optional packages. I went out of this world.

Phoenix offers the good parts of ruby on rails with easy swapping of functionalities when required.


#72

Fantastic news! We’re doing our first ElixirHK tonight of the group reboot – so this is very good timing for us in addition to great timing for the Elixir community :slight_smile: so exciting


#73

I absolutely love the switch to Milligram. Not because I use Milligram (I don’t), but because all the generated markup is now class free. I know that was mentioned before, but I think it’s been really undervalued.


#74

I’m trying to upgrade my 1.3 app to 1.4, but after following the steps I get an error that Poison is missing:

warning: failed to load Poison for Phoenix JSON encoding
(module Poison is not available).

Ensure Poison is loaded from your deps in mix.exs, or
configure an existing encoder in your Mix config using:

    config :phoenix, :json_library, MyJSONLibrary


  (phoenix) lib/phoenix.ex:40: Phoenix.start/2
  (kernel) application_master.erl:277: :application_master.start_it_old/4

I have httpoisn added to the startup applications:

  def application do
    [
      mod: {Lindaestate.Application, []},
      extra_applications: [:logger, :runtime_tools, :httpoison]
    ]
  end

#75

Do you have poison in your mix.exs? Phoenix has switched to the Jason lib now, which is a drop in replacement, with better performance.

Also, poison and httpoison are two different libs, one is for json the other is an http client


#76

Thanks for the fast answer. After I added {:poison, "~> 3.0"} to my mix.exs it stopped complaining.

But I also needed to add {:jason, "~> 1.1"} or the live_reload would report errors.


#77

That implies that Poison is being used or referenced from somewhere, maybe in a config file, should correct those to Jason and remove Poison from your mix.exs file. :slight_smile:


#78

Late to the party, but nice work! Webpack too!


#79

In app_web/endpoint.ex make sure json_decoder: is set to Phoenix.json_library() and not Poison.

# app_web/endpoint.ex
plug Plug.Parsers,
  parsers: [:urlencoded, :multipart, :json],
  pass: ["*/*"],
- json_decoder: Poison
+ json_decoder: Phoenix.json_library()

Edit: You should make sure this is in your config/config.exs. I was going from memory and forgot I had to do that as well.

# config/config.exs
+ config :phoenix, :json_library, Jason

#80

First: A huge thank you for all your work, this is great!! :heart:

I’m trying to get http2 working.

I’ve updated cowboy, I’ve generated the cert and I updated the config.

When I hit the 4001 endpoint I get an odd response.

localhost didn’t send any data.
ERR_EMPTY_RESPONSE

Thoughts?