1
votes

I know changing a Phoenix 1.2 project to Phoenix 1.3 will necessarily entails changing the file structure and the related path code.

However, I don't know some of the changes that need to the code itself apart from restructuring the files. In essence, is it required to make certain changes to the code itself? If it is required, can you please give me an example of such changes that need to be made to the code?

1
There is a very detailed step-by-step instruction written by Chris McCord.Aleksei Matiushkin
@mudasobwa thanks for replying to this! I have checked out the link before now. However, all of these changes are still somehow related to file restructuring. I'm being particular about a particular source code itself. For instance, passing nil as a default parameter into changeset could be obsolete in Phoenix 1.3. I want to know if there are such little changes that need to be made to the code base...Badops
The above covers everything to be done to successfully convert the project. I went through the process for two different projects and everything worked as a charm. So I’d say no, there are no changes to be applied save for the above. Also, I believe you realize that Chris McCord is the creator of Phoenix, that’s why I linked this particular gist.Aleksei Matiushkin
The only thing that could happen is that you will get some deprecation warnings after this. But they will contain the fixes right there in the warning and are usually resolved in seconds.Joe Eifert
@Johannes Thanks for this. Regards.Badops

1 Answers

0
votes

The most apparent are directory and name convention changes.

From my own experience when migrating https://github.com/Diamond/pxblog/blob/master/web/models/role.ex to Phx 1.3, you need to be careful about changes for Ecto version bump.

Sample git diff:

defmodule Pxblog.Role do
-  use Pxblog.Web, :model
+  use Ecto.Schema
+  import Ecto.Changeset