team-alembic / ash_authentication_phoenix

Drop-in authentication support for Phoenix apps using AshAuthentication.
MIT License
60 stars 29 forks source link

Update to Phoneix.HTML 4.0 #370

Open renews opened 8 months ago

renews commented 8 months ago

Similar to the issue on AshAdmin https://github.com/ash-project/ash_admin/issues/87.

Using override to be able to use this package is causing some issues.

{:phoenix_html, "~> 4.0", override: true},

Ash related packages

{:ash, "~> 2.18"},
{:ash_admin, github: "ash-project/ash_admin"},
{:ash_authentication, "~> 3.12"},
{:ash_authentication_phoenix, "~> 1.9"},
{:ash_phoenix, "~> 1.2"},
{:ash_postgres, "~> 1.4"},

Phoenix related packages

{:phoenix_ecto, "~> 4.4"},
{:phoenix_html, "~> 4.0", override: true},
{:phoenix_live_dashboard, "~> 0.8"},
{:phoenix_live_reload, "~> 1.4", only: :dev},
{:phoenix_live_view, "~> 0.20"},
{:phoenix, "~> 1.7"},

The issues


ompiling 29 files (.ex)
    warning: cannot import Phoenix.HTML.Form.humanize/1 because it is undefined or private
    │
  2 │   import Phoenix.HTML.Form, only: [humanize: 1]
    │   ~
    │
    └─ lib/ash_authentication_phoenix/ash_phoenix_errors.ex:2:3

    error: undefined function humanize/1 (expected AshPhoenix.FormData.Error.AshAuthentication.Errors.AuthenticationFailed to define such a function or for it to be imported, but none are available)
    │
  7 │        "#{humanize(error.strategy.identity_field)} or #{downcase_humanize(error.strategy.password_field)} was incorrect",
    │           ^^^^^^^^
    │
    └─ lib/ash_authentication_phoenix/ash_phoenix_errors.ex:7:11: AshPhoenix.FormData.Error.AshAuthentication.Errors.AuthenticationFailed.to_form_error/1

    error: undefined function humanize/1 (expected AshPhoenix.FormData.Error.AshAuthentication.Errors.AuthenticationFailed to define such a function or for it to be imported, but none are available)
    │
 16 │     |> humanize()
    │        ^^^^^^^^
    │
    └─ lib/ash_authentication_phoenix/ash_phoenix_errors.ex:16:8: AshPhoenix.FormData.Error.AshAuthentication.Errors.AuthenticationFailed.downcase_humanize/1

== Compilation error in file lib/ash_authentication_phoenix/ash_phoenix_errors.ex ==
** (CompileError) lib/ash_authentication_phoenix/ash_phoenix_errors.ex: cannot compile module AshPhoenix.FormData.Error.AshAuthentication.Errors.AuthenticationFailed (errors have been logged)
jimsynz commented 8 months ago

Hi there @renews

Looks like https://github.com/team-alembic/ash_authentication_phoenix/pull/360 fixed this, so you should be able to update to v1.9.2 and have it all work.