From 3244c26621a21f9eadbec2b51e79b4e833d29708 Mon Sep 17 00:00:00 2001 From: rafaelbiten Date: Fri, 26 Apr 2024 01:04:17 -0400 Subject: [PATCH] [DOCS] Add deprecation warning to Online Docs --- lib/connection.ex | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/connection.ex b/lib/connection.ex index c9ea852..aa48f87 100644 --- a/lib/connection.ex +++ b/lib/connection.ex @@ -2,6 +2,20 @@ defmodule Connection do @moduledoc ~S""" A behaviour module for implementing connection processes. + > #### Deprecation Warning {: .warning} + > + > With the inclusion of [`gen_statem`](https://www.erlang.org/doc/man/gen_statem.html) + in Erlang/OTP, this project is no longer necessary. + > + > See the following pull request as examples + of replacing `Connection` by `gen_statem` in existing projects: + > * https://github.com/elixir-ecto/postgrex/pull/643 + > * https://github.com/elixir-ecto/postgrex/pull/644 + > * https://github.com/elixir-ecto/db_connection/pull/275 + > + > We may release new versions if necessary to keep compatibility with Erlang/OTP and + Elixir but otherwise this package is no longer recommended for new projects. + The `Connection` behaviour is a superset of the `GenServer` behaviour. The additional return values and callbacks are designed to aid building a connection process that can handle a peer being (temporarily) unavailable.