Working on a prototype using phoenix 1.7-rc and ash_authentication_phoenix, and getting the following error: function MyAppWeb.Router.Helpers.auth_path/2 is undefined (module MyAppWeb.Router.Helpers is not available)
I saw in the release notes that Helpers were superceded by the verified routes with ~p. Is this the reason of the error, or is MyAppWeb.Router.Helpers supposed to be available with 1.7?
Hopefully the changelog is updated soon to reflect this change. Currently is is suggesting helpers are still generated by default. PR is pending acceptance.
Ah, now it makes sense. So new apps ship with ‘false’ by default and can be set to ‘true’. Old apps don’t have any setting and then the fallback is ‘true’, which can be explicitly set to ‘false’ (or removed)
It’s a concern for existing projects updating to 1.7.
The paragraph does not make this clear imho; as it’s not part of the ‘migration’ but of the new feature list. So I read it as:
We have a new feature. This feature replaces the Helpers module generated in your Phoenix router, but helpers will continue to work and be generated (when you create an Phoenix 1.7 app). You can disable router helpers by passing the helpers: false option to use Phoenix.Router.
This would make it clear to me as it makes the situations explicit.
This feature replaces the Helpers module generated in your Phoenix router. For new applications helpers are not generated by default. You can enable router helpers by passing the helpers: true option to use Phoenix.Router.
For existing applications the helpers will continue to work and be generated. You can disable router helpers by passing the helpers: false option to use Phoenix.Router.
Hello, can anyone please explain why Helpers are turned off by default? It has some useful functions. Sorry, I don’t use Elixir/Phoenix daily, I’m trying to pick it up (which I did try a few years back as well).