From 2687df43da23de9bc3235adb0fde150e4be686de Mon Sep 17 00:00:00 2001 From: Jeff Kreeftmeijer Date: Wed, 26 Jun 2024 14:43:00 +0200 Subject: [PATCH] Add fallback for Utils.compile_env/3 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] --- lib/appsignal/utils.ex | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/appsignal/utils.ex b/lib/appsignal/utils.ex index 959c4ece..9bb9287a 100644 --- a/lib/appsignal/utils.ex +++ b/lib/appsignal/utils.ex @@ -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