Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecations #183

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## v0.5.0 (TBA)

### Deprecations

* [`PowAssent.Ecto.UserIdentities.Context`] Deprecated `create/2` callback removed
* [`PowAssent.Ecto.UserIdentities.Context`] Deprecated `create/2` method in macro
* [`PowAssent.Ecto.UserIdentities.Context`] Deprecated `pow_assent_create/2` method in macro
* [`PowAssent.Ecto.UserIdentities.Context`] Deprecated `PowAssent.Ecto.UserIdentities.Context.create/3` method removed
* [`PowAssent.Operations`] Deprecated `PowAssent.Operations.create/3` method removed
* [`PowAssent.Plug`] Deprecated `PowAssent.Plug.create/2` method removed

## v0.4.8 (2020-05-18)

### Enhancements
Expand Down
17 changes: 0 additions & 17 deletions lib/pow_assent/ecto/user_identities/context.ex
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ defmodule PowAssent.Ecto.UserIdentities.Context do
{:ok, {number(), nil}} | {:error, {:no_password, changeset()}}
@callback all(user()) :: [user_identity()]

# TODO: Remove by 0.4.0
@callback create(user(), user_identity_params()) :: any()

@doc false
defmacro __using__(config) do
quote do
Expand Down Expand Up @@ -97,14 +94,6 @@ defmodule PowAssent.Ecto.UserIdentities.Context do
unquote(__MODULE__).all(user, @pow_config)
end

# TODO: Remove by 0.4.0
@deprecated "Please use `upsert/2` instead"
defdelegate create(user, user_identity_params), to: __MODULE__, as: :upsert

# TODO: Remove by 0.4.0
@deprecated "Please use `pow_assent_upsert/2` instead"
defdelegate pow_assent_create(user, user_identity_params), to: __MODULE__, as: :pow_assent_upsert

defoverridable unquote(__MODULE__)
end
end
Expand All @@ -128,12 +117,6 @@ defmodule PowAssent.Ecto.UserIdentities.Context do
|> repo!(config).one(opts)
end

# TODO: Remove by 0.4.0
@doc false
@deprecated "Use `upsert/3` instead"
@spec create(user(), user_identity_params(), Config.t()) :: {:ok, user_identity()} | {:error, {:bound_to_different_user, changeset()}} | {:error, changeset()}
def create(user, user_identity_params, config), do: upsert(user, user_identity_params, config)

@doc """
Upserts a user identity.

Expand Down
6 changes: 0 additions & 6 deletions lib/pow_assent/operations.ex
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ defmodule PowAssent.Operations do
end
end

# TODO: Remove by 0.4.0
@doc false
@deprecated "Use `upsert/3` instead"
@spec create(map(), map(), Config.t()) :: {:ok, map()} | {:error, {:bound_to_different_user, map()}} | {:error, map()} | no_return
def create(user, user_identity_params, config), do: upsert(user, user_identity_params, config)

@doc """
Upserts user identity for the user, and strategy provider name and uid.

Expand Down
6 changes: 0 additions & 6 deletions lib/pow_assent/plug.ex
Original file line number Diff line number Diff line change
Expand Up @@ -290,12 +290,6 @@ defmodule PowAssent.Plug do
Conn.put_private(conn, :pow_assent_create_session_callbacks, callbacks)
end

# TODO: Remove by 0.4.0
@doc false
@deprecated "Use `upsert_identity/2` instead"
@spec create_identity(Conn.t(), map()) :: {:ok, map(), Conn.t()} | {:error, {:bound_to_different_user, map()} | map(), Conn.t()}
def create_identity(conn, user_identity_params), do: upsert_identity(conn, user_identity_params)

@doc """
Will upsert identity for the current user.

Expand Down