Skip to content

Commit

Permalink
Add fallback for Utils.compile_env/3
Browse files Browse the repository at this point in the history
To allow for setups running a newer version of appsignal-elixir with
older versions of appsignal-phoenix or appsignal-plug, add a
deprecated fallback in order to not break any apps.

[changeset skip]
  • Loading branch information
jeffkreeftmeijer committed Jun 26, 2024
1 parent 024a379 commit 2687df4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/appsignal/utils.ex
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,11 @@ defmodule Appsignal.Utils do
require Logger
Logger.warning(message)
end

@deprecated "Use Application.compile_env/3 instead."
defmacro compile_env(app, key, default \\ nil) do
quote do
Application.compile_env(unquote(app), unquote(key), unquote(default))
end
end
end

0 comments on commit 2687df4

Please sign in to comment.