From da2c32c94b11e972e4a1b07b465839f775c70192 Mon Sep 17 00:00:00 2001 From: Marco De Bortoli Date: Sat, 16 May 2020 20:27:12 +0100 Subject: [PATCH 1/2] #1048: Update code to reflect namespace changes --- README.md | 2 +- composer.json | 2 +- src/BotManager.php | 20 ++++++++++---------- tests/BotManagerTest.php | 6 +++--- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 16b769f..9132092 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ It is possible however, to override the core version that this library requires: ```yaml "require": { "php-telegram-bot/telegram-bot-manager": "^1.4", - "longman/telegram-bot": "dev-develop as 0.59" + "php-telegram-bot/core": "dev-develop as 0.59" } ``` diff --git a/composer.json b/composer.json index d4e54c8..798d592 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ ], "require": { "php": "^7.1", - "longman/telegram-bot": "^0.59", + "php-telegram-bot/core": "^0.59", "longman/ip-tools": "^1.2", "psr/log": "^1.1" }, diff --git a/src/BotManager.php b/src/BotManager.php index f7e794c..c90a359 100644 --- a/src/BotManager.php +++ b/src/BotManager.php @@ -12,16 +12,16 @@ use Exception; use Longman\IPTools\Ip; -use Longman\TelegramBot\Entities\CallbackQuery; -use Longman\TelegramBot\Entities\ChosenInlineResult; -use Longman\TelegramBot\Entities\InlineQuery; -use Longman\TelegramBot\Entities\Message; -use Longman\TelegramBot\Entities\ServerResponse; -use Longman\TelegramBot\Entities\Update; -use Longman\TelegramBot\Exception\TelegramException; -use Longman\TelegramBot\Request; -use Longman\TelegramBot\Telegram; -use Longman\TelegramBot\TelegramLog; +use PhpTelegramBot\Core\Entities\CallbackQuery; +use PhpTelegramBot\Core\Entities\ChosenInlineResult; +use PhpTelegramBot\Core\Entities\InlineQuery; +use PhpTelegramBot\Core\Entities\Message; +use PhpTelegramBot\Core\Entities\ServerResponse; +use PhpTelegramBot\Core\Entities\Update; +use PhpTelegramBot\Core\Exception\TelegramException; +use PhpTelegramBot\Core\Request; +use PhpTelegramBot\Core\Telegram; +use PhpTelegramBot\Core\TelegramLog; use TelegramBot\TelegramBotManager\Exception\InvalidAccessException; use TelegramBot\TelegramBotManager\Exception\InvalidActionException; use TelegramBot\TelegramBotManager\Exception\InvalidParamsException; diff --git a/tests/BotManagerTest.php b/tests/BotManagerTest.php index f9ecffc..f082356 100644 --- a/tests/BotManagerTest.php +++ b/tests/BotManagerTest.php @@ -10,9 +10,9 @@ namespace TelegramBot\TelegramBotManager\Tests; -use Longman\TelegramBot\Request; -use Longman\TelegramBot\Telegram; -use Longman\TelegramBot\TelegramLog; +use PhpTelegramBot\Core\Request; +use PhpTelegramBot\Core\Telegram; +use PhpTelegramBot\Core\TelegramLog; use TelegramBot\TelegramBotManager\BotManager; use TelegramBot\TelegramBotManager\Exception\InvalidAccessException; use TelegramBot\TelegramBotManager\Exception\InvalidParamsException; From 9941b7cdf0dbb4726146cbb68a6d1795e0a0742b Mon Sep 17 00:00:00 2001 From: Marco De Bortoli Date: Sun, 24 May 2020 14:30:08 +0100 Subject: [PATCH 2/2] #1048: Properly update bot manager namespace --- CHANGELOG.md | 4 ++-- README.md | 2 +- composer.json | 12 ++++++------ src/Action.php | 4 ++-- src/BotManager.php | 10 +++++----- src/Exception/BotManagerException.php | 2 +- src/Exception/InvalidAccessException.php | 2 +- src/Exception/InvalidActionException.php | 2 +- src/Exception/InvalidParamsException.php | 2 +- src/Exception/InvalidWebhookException.php | 2 +- src/Params.php | 4 ++-- tests/ActionTest.php | 6 +++--- tests/BotManagerTest.php | 14 +++++++------- tests/ParamsTest.php | 8 ++++---- tests/TestHelpers.php | 2 +- 15 files changed, 38 insertions(+), 38 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0a205d..7081e01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,7 +53,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c ### Notes - [:ledger: View file changes][1.2.2] ### Added -- Linked version numbers in changelog for easy verification of code changes. +- Linked version numbers in changelog for easy verification of code changes. ### Changed - Upgraded dependencies and bumped core to version 0.48.0. @@ -94,7 +94,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c - [:ledger: View file changes][1.0.0] ### Changed - [:exclamation:][1.0.0-bc-move] Move to `php-telegram-bot/telegram-bot-manager` on packagist. -- [:exclamation:][1.0.0-bc-move] Move to `TelegramBot\TelegramBotManager` namespace. +- [:exclamation:][1.0.0-bc-move] Move to `PhpTelegramBot\PhpTelegramBotManager` namespace. ## [0.44.0] - 2017-05-05 ### Notes diff --git a/README.md b/README.md index 9132092..adbbe7a 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,7 @@ Let's start off with a simple example that uses the webhook method: ```php