How to update from Phoenix 1.3.0 to 1.3.1

Please can someone point me at the docs for updating from Phoenix version 1.3.0 to 1.3.1

mix phx.new --version
Phoenix v1.3.0

On github i see 1.3.1 was released 2 days ago. Unclear how to get latest when previous version already installed. Do I just run the same installer as for a fresh install?

Have the standard 1.3.1 instructions for installation here - https://hexdocs.pm/phoenix/installation.html

Ok, I just ran the same installer as for fresh install

mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez

This then asked if I wished to overwrite the existing install. Having done that, it is now version 1.3.1

2 Likes

Yes, this is the proper way to upgrade the phx.new command.

2 Likes

Phoenix 1.3.2 was released a day ago. Same process! Love Phoenix!:

mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez
mix phx.new --version

Console Output:

cjsMBP15:company_meme cj$ mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez
Found existing entry: /Users/cj/.kiex/mix/archives/elixir-1.6.1/phx_new
Are you sure you want to replace it with "https://github.com/phoenixframework/archives/raw/master/phx_new.ez"? [Yn] y
* creating /Users/cj/.kiex/mix/archives/elixir-1.6.1/phx_new
cjsMBP15:company_meme cj$ mix phx.new --version
Phoenix v1.3.2
1 Like

Hello , after update I have many warning , now Im 1.3 to 1.3.2

warning: Enum.partition/2 is deprecated, use Enum.split_with/2
  lib/phoenix/endpoint/handler.ex:39

warning: Enum.partition/2 is deprecated, use Enum.split_with/2
  lib/mix/tasks/phoenix.gen.model.ex:155

warning: Enum.partition/2 is deprecated, use Enum.split_with/2
  lib/mix/phoenix/schema.ex:234

warning: Plug.Conn.WrapperError.reraise/3 is deprecated. Use reraise/1 or reraise/4 instead.
Found at 2 locations:
  lib/phoenix/controller/pipeline.ex:138
  lib/phoenix/router.ex:280

Generated phoenix app
==> guardian
Compiling 18 files (.ex)
Generated guardian app
==> trangell_api_gateway_web
Compiling 9 files (.ex)
warning: Plug.Conn.WrapperError.reraise/3 is deprecated. Use reraise/1 or reraise/4 instead.
Found at 3 locations:
  lib/trangell_api_gateway_web/router.ex:4
  lib/trangell_api_gateway_web/router.ex:8
  lib/trangell_api_gateway_web/router.ex:12

how do I fix them ?

Use an older version of elixir which has not yet deprecated those functions.

Alternatively wait for a version of phoenix that has fixed those warnings.

1 Like

Does it create a serious problem for me? because I wrote half of my project with elixir 1.6.4 … ?

Deprecations won’t affect your program. When Elixir hits 2.0, the deprecations will be removed, so you’ll need to fix them then if they haven’t already been fixed. 2.0 seems to be a while away still.

2 Likes

Well. You can not update to elixir 2.0 with phoenix 1.3 anyway, so you do not need to care, and elixir will not remove any of the functions mentioned in the warning before 2.0.

And until we get to Elixir 2.0, we will probably have a phoenix version that is compatible with it.

So most of the time, I simply file issues on the dependency. If there is no reaction I try to get rid of that dependency.

But on my own code I try to keep up to date and warning free. But especially for libraries which try to maintain compatibility since 1.0, it is impossible to adhere to those warnings, without breaking their compatibility promise.

2 Likes

I have a question why the phoenix team don’t fix the error for example compatibility with elixir 1.6.4 like below warning
‍‍

warning: Plug.Conn.WrapperError.reraise/3 is deprecated. Use reraise/1 or reraise/4 instead.
Found at 3 locations:

because There is a lot of time to released elixir 2 ?

They’re probably fixed in Phoenix master already, just not released yet.

4 Likes