diff --git a/CHANGELOG.md b/CHANGELOG.md index 4440d1f..47864d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Telegram Client Change Log -## 1.0.0 under development +## 1.0.1 + +- Client request callbacks are now deprecated and will be removed in version 2.0 + +## 1.0.0 - Initial release. diff --git a/src/Request/TelegramRequestInterface.php b/src/Request/TelegramRequestInterface.php index 82b5f95..fe27e96 100644 --- a/src/Request/TelegramRequestInterface.php +++ b/src/Request/TelegramRequestInterface.php @@ -30,6 +30,8 @@ public function getData(): array; public function getFiles(): array; /** + * @deprecated Will be removed in 2.0 + * * Sets a callback which will be called when the request is successfully finished * Callback must have a such signature: function( * \Psr\Http\Message\ResponseInterface $response, // Telegram API response @@ -44,6 +46,8 @@ public function getFiles(): array; public function onSuccess(?callable $callback): self; /** + * @deprecated Will be removed in 2.0 + * * Returns success callback if it was set * * @psalm-pure @@ -53,6 +57,8 @@ public function onSuccess(?callable $callback): self; public function getSuccessCallback(): ?callable; /** + * @deprecated Will be removed in 2.0 + * * Sets a callback which will be called when the request is finished with an error * Callback must have a such signature: function( * \Psr\Http\Message\ResponseInterface $response, // Telegram API response @@ -68,6 +74,8 @@ public function getSuccessCallback(): ?callable; public function onError(?callable $callback): self; /** + * @deprecated Will be removed in 2.0 + * * Returns error callback if it was set * * @psalm-pure