     # mix.exs file can be different than the actual name and we
     # choose to respect the one in the mix.exs
     config =
-      Keyword.merge(Mix.Project.deps_config, config)
+      Keyword.merge(Mix.Project.deps_config(), config)
       |> Keyword.put(:app_path, opts[:build])
       |> Keyword.put(:build_scm, scm)
 
     env = opts[:env] || :prod
-    old_env = Mix.env
+    old_env = Mix.env()
 
     try do
       Mix.env(env)

  @doc """
  Formats the status of a dependency.
  """
  def format_status(%Mix.Dep{status: {:ok, _vsn}}),
    do: "ok"

  def format_status(%Mix.Dep{status: {:noappfile, path}}),
    do: "could not find an app file at #{inspect(Path.relative_to_cwd(path))}. " <>
        "This may happen if the dependency was not yet compiled, " <>
        "or you specified the wrong application name in your deps, " <>
        "or the dependency indeed has no app file (then you can pass app: false as option)"

  def format_status(%Mix.Dep{status: {:invalidapp, path}}),
    do: "the app file at #{inspect(Path.relative_to_cwd(path))} is invalid"

  def format_status(%Mix.Dep{status: {:invalidvsn, vsn}}),
    do: "the app file contains an invalid version: #{inspect vsn}"

  def format_status(%Mix.Dep{status: {:nosemver, vsn}, requirement: req}),
    do: "the app file specified a non-Semantic Versioning format: #{inspect vsn}. Mix can only match the " <>
        "requirement #{inspect req} against semantic versions. Please fix the application version " <>
        "or use a regex as a requirement to match against any version"

  def format_status(%Mix.Dep{status: {:nomatchvsn, vsn}, requirement: req}),
    do: "the dependency does not match the requirement #{inspect req}, got #{inspect vsn}"

  def format_status(%Mix.Dep{status: {:lockmismatch, _}}),
    do: "lock mismatch: the dependency is out of date. To fetch locked version run \"mix deps.get\""

  def format_status(%Mix.Dep{status: :lockoutdated}),
    do: "lock outdated: the lock is outdated compared to the options in your mix.exs. To fetch locked version run \"mix deps.get\""

  def format_status(%Mix.Dep{status: :nolock}),
    do: "the dependency is not locked. To generate the \"mix.lock\" file run \"mix deps.get\""

  def format_status(%Mix.Dep{status: :compile}),
    do: "the dependency build is outdated, please run \"#{mix_env_var()}mix deps.compile\""

  def format_status(%Mix.Dep{app: app, status: {:divergedreq, vsn, other}} = dep) do
    "the dependency #{app} #{vsn}\n" <>
    "#{dep_status(dep)}" <>
    "\n  does not match the requirement specified\n" <>
    "#{dep_status(other)}" <>
    "\n  Ensure they match or specify one of the above in your deps and set \"override: true\""
  end

  def format_status(%Mix.Dep{app: app, status: {:divergedonly, other}} = dep) do

    * `:build` - the build path for the dependency

  """
  defstruct scm: nil,
            app: nil,
            requirement: nil,
            status: nil,
            opts: [],
            deps: [],
            top_level: false,
            extra: [],
            manager: nil,
            from: nil

  @type t :: %__MODULE__{
          scm: module,
          app: atom,
          requirement: String.t() | Regex.t() | nil,
          status: atom,
          opts: keyword,
          top_level: boolean,
          manager: :rebar | :rebar3 | :mix | :make | nil,
          from: String.t(),
          extra: term
        }

  @doc """
  Returns loaded dependencies from the cache for the current environment.
