Skip to content
This repository has been archived by the owner on Jul 22, 2023. It is now read-only.

[Fixes #155] Update to Phoenix 1.7.1 #168

Merged
merged 14 commits into from
Mar 4, 2023
Merged

Conversation

zorn
Copy link
Owner

@zorn zorn commented Mar 4, 2023

Fixes #155

PR code walk: https://www.youtube.com/watch?v=RYOc2nL-qfY

How I approached the upgrade:

Notes

  • My update was made that much easier because I had already been using Elixir 1.14 and Tailwind. If those are new to your project this will have more to do.
  • If I were updating a more significant project, I would treat the newer optional features of 1.7 (Removal of Views, Verified Routes) as later changes to be done in separate work. Getting to 1.7 without those is pretty painless, but when you do them all, it can get a bit heavy. (To keep using views look to adding {:phoenix_view, "~> 2.0"} to your dependency list.
  • I did my best to update my own project to match the new generators as much as possible. This meant bring in some things like core components and hero icons I'm not using yet.
  • Those hero icons were added in 1.7.1, and it took me a bit to realize I needed the 1.7.1 installer (I was using 1.7.0 at first).

@@ -7,7 +7,8 @@ defmodule FranklinWeb.Endpoint do
@session_options [
store: :cookie,
key: "_franklin_key",
signing_salt: "XYGfSGw+"
signing_salt: "XYGfSGw+",
same_site: "Lax"
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: Lookup what this means.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -44,16 +43,18 @@ defmodule Franklin.MixProject do
[
# Core Phoenix Deps
{:ecto_sql, "~> 3.6"},
{:esbuild, "~> 0.4", runtime: Mix.env() == :dev},
{:esbuild, "~> 0.5", runtime: Mix.env() == :dev},
{:finch, "~> 0.14"},
Copy link
Owner Author

@zorn zorn Mar 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a new addition which is easy to miss. Seems like the preferred networking library for the default Swoosh integration. I'm not doing email currently, but I pulled it in to match the generator.

When adding it, I hit a bit of a dependency conflict with castore. I believe I resolved it by first unlocking castore (with mix deps.unlock castore) and then adding finch and running the normal deps.get.

@zorn zorn merged commit 87bfc52 into main Mar 4, 2023
@zorn zorn deleted the issue-155-update-phoenix-1.7.1 branch March 4, 2023 16:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update to Phoenix 1.7
1 participant