aj-foster / identity

Rapid authentication for new Elixir projects
MIT License
9 stars 2 forks source link

`use Phoenix.HTML` is no longer supported in v4.0. #1

Closed yujonglee closed 2 months ago

yujonglee commented 2 months ago
== Compilation error in file lib/identity/phoenix/html.ex ==
** (RuntimeError) use Phoenix.HTML is no longer supported in v4.0.

To keep compatibility with previous versions, add {:phoenix_html_helpers, "~> 1.0"} to your mix.exs deps
and then, instead of "use Phoenix.HTML", you might:

    import Phoenix.HTML
    import Phoenix.HTML.Form
    use PhoenixHTMLHelpers

    (phoenix_html 4.1.1) expanding macro: Phoenix.HTML.__using__/1
    lib/identity/phoenix/html.ex:3: Identity.Phoenix.HTML (module)
    (elixir 1.16.2) expanding macro: Kernel.use/1
    lib/identity/phoenix/html.ex:3: Identity.Phoenix.HTML (module)
could not compile dependency :identity, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile identity --force", update it with "mix deps.update identity" or clean it with "mix deps.clean identity"

https://github.com/aj-foster/identity/blob/2aa802b413c149f5bcc9d176840e69a28100d5fe/lib/identity/phoenix/html.ex#L3

https://github.com/phoenixframework/phoenix_html/blob/main/CHANGELOG.md#v400-2023-12-19

aj-foster commented 2 months ago

Hello there 👋🏼 Thanks for reporting this. Latest main fixes this, and upgrades all of the provided templates to Phoenix 1.7-era code. As a side effect, Phoenix version 1.7 is now required.