Skip to content

Commit

Permalink
Add more options to init/2 deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Dec 24, 2023
1 parent 5539590 commit 0dfdb11
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/phoenix/endpoint/supervisor.ex
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ defmodule Phoenix.Endpoint.Supervisor do
secret_conf =
cond do
Code.ensure_loaded?(mod) and function_exported?(mod, :init, 2) ->
IO.warn("#{inspect(mod)}.init/2 is deprecated, use config/runtime.exs instead")
IO.warn(
"#{inspect(mod)}.init/2 is deprecated, use config/runtime.exs instead " <>
"or pass additional options when starting the endpoint in your supervision tree"
)

{:ok, init_conf} = mod.init(:supervisor, env_conf)
init_conf

Expand Down

0 comments on commit 0dfdb11

Please sign in to comment.